Bubble Sort Visualizer
Learn how bubble sort works step by step
Generate New Array
Start Sorting
Pause
Reset
Animation Speed:
400ms
Click "Generate New Array" to start
Pass:
0
Comparing positions:
-
How it works:
Bubble sort compares adjacent elements and swaps them if they're in the wrong order. The largest element "bubbles up" to the end in each pass.
0
Total Steps
0
Comparisons
0
Swaps
O(n²)
Time Complexity