Module · Sorting
Watch comparisons, swaps, and sorted regions unfold in real time.
Comparisons
0
Swaps
0
Current Step
0
Algorithm
Bubble Sort
Bubble Sort
Bubble Sort repeatedly compares adjacent elements and swaps them if they are in the wrong order. Larger values gradually "bubble" toward the end of the array.
Yellow bars indicate elements being compared. Green bars show a swap in progress. Blue bars mark elements already in their final sorted position.