• op is an optional binary predicate to be used as the sorting criterion:
op(elem1,elem2)
• Note that after this call, the range is no longer a heap.
• The caller has to ensure that, on entry, the elements in the range [beg,end) are a heap (according
to the same sorting criterion).
• Complexity: n-log-n (at most, numElems*log(numElems) comparisons).