...

/

Sort

Sort

Sorting and verifying the sortedness of your data has been made very easy in C++. Let's find out how.

You can sort a range with std::sort or std::stable_sort or sort until a position with std::partial_sort. In addition std::partial_sort_copy copies the partially sorted range. With std::nth_element ...