Stable sorting algorithm facts for kids
A sorting algorithm is called stable if it preserves the order of elements with the same sorting key. Otherwise it is called unstable. Merge sort is an example of a stable sorting algorithm, quicksort is an example of an unstable sorting algorithm. Note that being stable has nothing to do with how difficult it is to do the sorting (known as complexity). Bubble sort is very easy to implement, but takes a very long time. It is a stable sorting algorithm. Heapsort is very efficient, but it is not stable.
All content from Kiddle encyclopedia articles (including the article images and facts) can be freely used under Attribution-ShareAlike license, unless stated otherwise. Cite this article:
Stable sorting algorithm Facts for Kids. Kiddle Encyclopedia.