C++ Sorts

C++: Heap Sort

#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);
}

SOURCE

Subscribe now to receive more great content like this!