Sorting algorithms can be classified as stable or unstable based on whether the relative order of equal elements is preserved or not. Stable sorting algorithms maintain the original order, while unstable sorting algorithms may change it.
Sort: