#include <algorithm> // for std::make_heap, std::sort_heap template <typename Iterator> void heap_sort(Iterator begin, Iterator end) { std::make_heap(begin, end); std::sort_heap(begin, end); }

Skip to content
# C++: Heap Sort

*Related*

Posted on by TFE Times