Mental Model
Stable sorting keeps equal items in the same order they started. Different sorts work best for different needs.
Analogy: Imagine sorting a deck of playing cards by number but keeping the order of suits the same if numbers match, like stacking books by height but keeping the same color order for books of the same height.
Unsorted list: [5♠] -> [3♦] -> [5♥] -> [2♣] -> [3♠] -> null Stable sort result (by number): [2♣] -> [3♦] -> [3♠] -> [5♠] -> [5♥] -> null Unstable sort result (by number): [2♣] -> [3♠] -> [3♦] -> [5♥] -> [5♠] -> null
