Exchange Sort
Exchange Sort Exchange sort is a basic comparison-based sorting algorithm. It compares every pair of elements and swaps them when they are in the wrong order. It is one of the simplest sorting methods and serves as a conceptual baseline for understanding comparison sorting. Problem Given a sequence $A$ of length $n$, reorder it such that $$ A[0] \le A[1] \le \cdots \le A[n-1] $$ Algorithm Compare each pair $(i,...