pop_heap

Syntax:

    #include <algorithm>
    void pop_heap( random_access_iterator start, random_access_iterator end );
    void pop_heap( random_access_iterator start, random_access_iterator end, StrictWeakOrdering cmp );

The pop_heap() function removes the largest element (defined as the element at the front of the heap) from the given heap.

If the strict weak ordering comparison function object cmp is given, then it is used instead of the < operator to compare elements.

pop_heap() runs in logarithmic time.

Related Topics: is_heap, make_heap, push_heap, sort_heap