sorting
Stable sorting can simplify a multi-key sort
Anonymous
A stable sort preserves the input order of items whose keys compare equal. For a multi-key sort, sort by the least important key first, then apply stable sorts in order of increasing importance. This relies on each later sort being stable; a comparator that handles all keys at once is another option.
0