Stable Selection Sort
Stable Selection Sort Stable selection sort modifies selection sort to preserve the relative order of equal elements. Instead of swapping the minimum element into position, it removes the minimum and shifts the intervening elements right by one position. This ensures stability at the cost of additional data movement. Problem Given a sequence $A$ of length $n$, reorder it such that $$ A[0] \le A[1] \le \cdots \le A[n-1] $$ and...