ext-ds
ext-ds copied to clipboard
Allow PriorityQueue priorities to be adjusted
I wonder can a PriorityQueue allow smallest priority number to be at the front of the queue? Because some people might use 1 as highest priority (like me :p) .
You could always make it negative. 😉 I see no reason why both a min and max heap can't be available. I hope to find the time and energy to accomplish that soon.
It would be nice if we could provide a callable for comparing priorities of two items. In some cases the priority may not be a number but something else that cannot be transformed to a number.