pop_heap

C++ Reference

pop_heap
Syntax:
  #include <algorithm>
  void pop_heap( iterator start, iterator end );
  void pop_heap( iterator start, iterator end, StrictWeakOrdering cmp );

The pop_heap() function removes the larges 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: