Translations of this page?:

make_heap

Syntax:

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

The make_heap() function turns the given range of elements [start,end) into a heap.

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

make_heap() runs in linear time.

Related Topics: is_heap, pop_heap, push_heap, sort_heap

 
• • • IndexRecent changesRSScc