-
Notifications
You must be signed in to change notification settings - Fork 0
Priority Queues
Bruno Fernandes edited this page Nov 11, 2018
·
2 revisions
Max-oriented priority queues have a similar API to ordinary queues.
They support two key operations:
-
Push
- pushes an item onto the priority queue, -
Pop
- removes and returns the largest item in the priority queue.
A single implementation, the BinaryHeap
, is available.
Both Push
and Pop
take linearithmic time, and the memory the heap occupies is proportional to the number of items it holds.