This algorithm for priority queues is due to Introduction to Algorithms by T. Cormen, C. Leiserson, R. Rivest. 1989 MIT Press.
Returns a binary heap suitable which can be used for priority queue operations.
Returns the number of elements in heap.
Inserts item into heap. item can be inserted multiple times. The value returned is unspecified.
Returns the item which is larger than all others according to the
pred<? argument to
make-heap. If there are no items in
heap, an error is signaled.