Mental Model
Sorting stability means keeping the original order of equal items after sorting. Different sorts work best in different situations depending on data size and order.
Analogy: Imagine sorting a deck of cards by number but keeping the same order for cards with the same number, like keeping friends standing in line without mixing them up.
Unsorted list: 5a -> 3 -> 5b -> 2 -> 3 -> null Stable sort keeps order of equal items: 2 -> 3 -> 3 -> 5a -> 5b -> null Unstable sort may change order: 2 -> 3 -> 3 -> 5b -> 5a -> null
