Stable Sort
Domain: Algorithms
🎯 Motivation
A stable sort preserves the original order of equal elements. This matters when sorting by multiple criteria.
📋 Concrete Example
Sort students by score while keeping alphabetical order for tied scores. If Alice and Bob both score 90 and Alice was listed first, she stays first after sorting by score.
🔗 Analogy
Ranking runners by time, but for ties, the runner who registered earlier keeps the higher position. The sort respects the original order for equal times.