Lingo

Bubble Sort Visualiser

Step through each pass and watch the largest unsorted value bubble to the right end.

Input

Each pass floats the largest remaining value to the right.

24

Complexity

Operations for n elements.

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

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

Start unsorted.

1 / 185
0Comparisons
0Writes
1/185Steps
RunningResult

Bubble sort done.