January 2012
Intermediate to advanced
396 pages
8h 16m
English
As gadget addicts, there are so many gadgets we desire to buy, but often our budget is limiting. So, let's keep a prioritized list of gadgets we hope to buy.
Priority queues come to our help here.
Let's see how we can create our own implementation of the generic priority queue. .NET doesn't offer a built-in generic priority queue.
As there can be more than one gadget that you want with the same zest, so the shopping list can have more than one element with the same priority. We shall represent the priority queue as a SortedList<TKey,TValue>, where the priority will be represented by any type that can be compared for equality and the values will be represented by a list of values of type TValue ...
Read now
Unlock full access