Bubble Sort
Repeatedly swap adjacent elements if out of order. Simple but O(n²).
Unsorted
Comparing
Swapping
Sorted
Controls
Time: O(n²) | Space: O(1)
Stats
0 stepsPress Run to trace the algorithm one step at a time.