Unsorted
Comparing
Swapping
Focus
Sorted
Algorithm 1
Auxiliary Array (Merge Buffer)
Algorithm 2
Auxiliary Array (Merge Buffer)
Live Action Notes
Waiting to start animation...
Execution Flow
5
Custom Array
Live Metrics
Comparisons
0
Array Access/Swaps
0
System Status
Idle
Bubble Sort
Algorithm Overview
Time Complexity
Best
Ω(n)
Avg
Θ(n²)
Worst
O(n²)
Space Complexity
Space
O(1)
Best
O(log n)
Avg
O(log n)
Worst
O(n)
Repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.