Algorithm

Playback

5

Array Configuration

Visualization

Bubble Sort

Compares adjacent elements and swaps them if they're in wrong order

Best Case: O(n)
Average: O(n²)
Worst Case: O(n²)
Space: O(1)
Stable: Yes
Comparisons: 0
Swaps: 0
Steps: 0
Time: 0.0s
Sorting History