heap is a binary tree where each node is greater than both its leaves.
The tree itself is complete or nearly complete at all times,
so the heap is backed by a compact array.
When values are added or removed, the tree rotates until the value has
sunk until its parent is greater, or floated until all children are less.