Maximum priority queue (source code)

= Maximum priority queue

A <priority queue> whose distinguished entry has largest key. A <max-heap> implements maximum inspection in <constant time>, and insertion, extraction of a maximum and increasing the key of a located entry in $O(\log n)$ <running time>. An entry handle needs its current heap index to support that last bound; searching by an arbitrary key can take <linear time>. Multiple entries can have equal keys without requiring a particular tie order.