Daily bit(e) of C++ | std::stable_sort
Daily bit(e) of C++ #243, The stable sort algorithm: std::stable_sort.
The std::stable_sort is a slower version of std::sort that additionally provides stability, i.e. equivalent elements maintain their relative positions.
This is important, notably for interactive cases when one range can be repeatedly sorted based on different aspects.