Skip to content

Quick sort

ordering

Level 2 of 3

Also called Partition-exchange 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

Whole numbers from 1 to 99, between 2 and 12 of them, separated by commas or spaces.