Hacker News new | ask | show | jobs
by Sohcahtoa82 2285 days 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.

1 comments

You wouldn't use min/max as part of sorting though.