CAMBRIDGE IGCSE · EXTENSION
Quicksort.
Partition around a pivot, then sort the smaller ranges.
Extra exploration · this is not a named algorithm requirement in the selected specification.
THE VISUAL TRACE
00 / 23Follow the values
Ready to explore
Press Play or Next step to begin. No values have been checked yet.
[]
7
12
29
34
41
56
6 current checked / fixedindex starts at 1
NOW IN THE ALGORITHM
Press Play to begin.01 / THE IDEA
What should you notice?
The pivot reaches its final position after partitioning. Values on each side are sorted separately.
02 / KEEP PRACTISING
Change the outcome.
Try a first value, a last value, a missing target, duplicates, negative numbers, and a single value. Use the slider to revisit any step.
Explore more 0478 lessons ↗