Closed
Description
Currently PriorityQueue
defaults to a max-heap and if you want to use it as a min-heap you need to overload Ord
and change the comparison.
But you should be able to use the default ordering and simply specify that you want a min-heap, so we can use it for types like (uint, &str)
for example.
The simple idea would be to simply make a new_min_heap
and a min_heap_with_capacity
constructors.
Thoughts?