Stable sort algorithms sort equal elements in the same order that they appear in the input.
stable_sort([10_1, 8_1, 3_1, 8_2])
> [3_1, 8_1, 8_2, 10_1]
Unstable sorting algorithm
unstable_sort([10_1, 8_1, 3_1, 8_2])
> [3_1, 8_2, 8_1, 10_1]
References
“Sorting Algorithm.” 2022. Wikipedia, June. https://en.wikipedia.org/w/index.php?title=Sorting_algorithm&oldid=1095879356.