Skip to content

Glossary: Data Structures and Algorithms

Stable sort

Also written: stable, stability

A sort that keeps items with equal keys in their original order. Python's sort is always stable, so Steam & Co stays ahead of Little Owl when both totals are 144.

Where the book teaches it

Related terms

TimsortKey functionMerge sort