6.10 Stable Sorting
6.10 Stable Sorting A sorting algorithm is stable when equal keys keep their original relative order. Stability is not part of the basic sorting contract, because an unstable output may still be ordered and may still be a permutation of the input. Stability is an additional semantic guarantee about records, identities, and secondary fields. Problem You have records with keys, and two records may have equal keys but different attached...