Medium
15
Unsorted
Comparing
Pivot
Sorted
Bubble Sort
Repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Time Complexity
Best: O(n)
Avg: O(n²)
Worst: O(n²)
Space
O(1)
Stability
Stable
Repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Best: O(n)
Avg: O(n²)
Worst: O(n²)
O(1)
Stable