stability of heap sort

The stability of the heap sort refers to the preservation of the relative order of equal elements after sorting. In other words, if there are two elements with the same value in the original array, and one appears before the other, a stable sorting algorithm will ensure that the element that appeared first will still appear first after sorting. However, heap sort is not a stable sorting algorithm as it may change the relative order of equal elements during the sorting process.

Requires login.