Exit Slides

Stable Sort

overview

Summary

Stable sorting refers to sorting algorithms or implementations that preserve the relative order of records with equal keys. Stability is crucial when performing multi-key sorts, when original order conveys meaning, or when data must be processed in stages without losing implicit order. Many standard libraries offer stable sorting operations, and several classic algorithms can be implemented stably. Stability often involves trade-offs in memory usage and, in some cases, runtime, but does not inherently change the asymptotic time complexity class.
← Prev Topic Slide 1 / 1