Sorting Lab

Algorithm visualizer

Bubble Sort

Repeatedly compares adjacent values and moves larger values toward the end.

Complexity

Run

Step through the array

Each pass bubbles the largest remaining value into its final position.

setup
9
4
7
2
8
1
6
3
5

Step 1 / 64: Start with adjacent comparisons. A pass ends when the largest remaining value reaches the right edge.

0%