Trivia ForgePlay free →

What property of a sorting algorithm ensures that the relative order of equal elements is preserved?

Show answer

Stability

Stable sorts, such as Merge Sort and Insertion Sort, are crucial when sorting data by multiple keys. Unstable sorts, such as Quicksort and Heapsort, do not guarantee the preservation of the original relative order of identical elements.

Also asked as:
  • What term describes a sorting algorithm that does not change the relative order of records with equal keys?

Would you remember this in 6 months?

Trivia Forge uses spaced repetition so facts stick. Free, no signup needed.

Turn on Algorithms practice →

More Algorithms trivia

See all 83 →