Say $A'$ is the output of $\mathrm{Bubblesort}(A)$ on an array of length $N$.To prove that Bubblesort works, we have to prove that it always terminates and that$$A'[0]\leq A'[1] \leq \dots \leq A'[N-1].$$Is there anything else that needs to be proven to show that Bubblesort actually sorts?(I have found this question in a textbook about algorithms.)
Proving the Bubblesort actually sorts
algorithms;sorting;arrays