cpp/algorithm/pop heap

Swaps the value in the position and the value in the position  and makes the subrange  into a heap. This has the effect of removing the first element from the heap defined by the range.

The first version of the function uses to compare the elements, which makes the heap a. The second uses the given comparison function.

Return value
(none)

Complexity
At most 2&times;log(N) comparisons where.