4 ms·
Not if you're trying to do a stable sort. If you've got a list of people that is already sorted by name, and you want to sort them by age but still preserve th
by Sohcahtoa82 7y ago
Not if you're trying to do a stable sort.
If you've got a list of people that is already sorted by name, and you want to sort them by age but still preserve the name sorting for each age (ie, if Alice and Bob are both 30 years old, I still want Alice to appear before Bob in the list), then having a defined way to break ties greatly simplifies the code.
- lmm 7y agoYou wouldn't use min/max as part of sorting though.