Lingo

Quicksort Visualiser

Step through each partition and watch a pivot carve the array in two.

Input

Partition around a pivot, then recurse into each side.

24

Complexity

Operations for n elements.

  • Best O(n log n)
  • Average O(n log n)
  • Worst O(n²)

Not stable · In place

Array
24
5
8
23
6
2
17
21
20
13
15
12
19
7
14
11
10
18
1
22
4
3
16
9

Partition around a pivot, then recurse into each side.

1 / 65
0Comparisons
0Writes
1/65Steps
RunningResult

Quicksort done.