Quick sort
Take the last number as a pivot and swap every smaller number to its left, so the pivot lands in its place for good, then sort the part on each side the same way. A row already in order is its worst case.
- comparisons
- 0
- swaps
- 0
step 1 of 1
Examples