What does it mean that a sorting algorithm is stable?

Start playing free

  1. It never crashes on large lists
  2. It always takes the same time
  3. Items with equal keys keep their original order

🔒 The answer is for AhaBulb members. Members see the answer, why it's right and the official sources for every card of Stuff Every Technology Expert Should Know, plus timed practice exams.

The first 50 cards of every test are free to play.

Play the free cards See membership

Like this card?
Play the game

References

  1. Python docs: Sorting Techniques docs.python.org/3/howto/sorting.html Checked 2026-10-11.

Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.

Test yourself in the game