Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

searching for priority Queue (min heap or max heap) in C# , what is efficient structure? [duplicate]

Tags:

c#

.net

I am searching for priority Queue (min heap or max heap) in C# , is there built in data structure in C# , what's that ? , how is it efficiency ?
tips : 1-efficient Working with memory
2-Fast in Insert and remove

like image 845
mojtaba Avatar asked Jan 26 '26 21:01

mojtaba


1 Answers

There's my Priority Queue in C#. Also, a lighter-weight version is at A Generic Binary Heap Class.

The second one is more memory-efficient than the first.

Neither is "fast in search." Searching a heap is not an efficient operation. Heaps are designed to quickly insert and quickly remove the first item.

like image 159
Jim Mischel Avatar answered Jan 28 '26 10:01

Jim Mischel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!