Binary Heaps as Priority Queues

Priority queues need not impose a total ordering on their elements.

The only requirement of a priority queue is that removal delivers the element with the lowest key.

A binary heap has ready access to the element with the lowest key: its root.

A binary heap can easily deliver its root, but it must also remove it from the structure.

The binary heap invariant: