Marvin Humphrey
and 1 contributors

Add an element to the Queue if either... a) the queue isn't full, or b) the element belongs in the queue and should displace another

Pop the *least* item off of the priority queue.

Return the least item in the queue, but don't remove it.

Empty the queue into an array, with the highest priority item at index 0.