as the priority queue algorithm.
Heaps are binary trees for which every parent node has a value less than or
-equal to any of its children. This implementation uses arrays for which
+equal to any of its children. We refer to this condition as the heap invariant.
+
+This implementation uses arrays for which
``heap[k] <= heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]`` for all *k*, counting
elements from zero. For the sake of comparison, non-existing elements are
considered to be infinite. The interesting property of a heap is that its
backwards, and this was also used to avoid the rewinding time. Believe me, real
good tape sorts were quite spectacular to watch! From all times, sorting has
always been a Great Art! :-)
-