← Back to Sorting Algorithms

Quicksort

Pivot Strategy:
Comparisons: 0
Swaps: 0
Array Accesses: 0
Recursion Depth: 0
Status: Ready

Quicksort

Choose a pivot, partition around it (smaller left, larger right), recurse on both sides. The most widely used sorting algorithm in practice.

Average: O(n log n)
Worst: O(n²) (bad pivots)
Space: O(log n) stack
Stable: No

Magenta = pivot. Regions colored by recursion depth. Watch partitioning in action.