Bubble Sort

Bubble Sort repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.

Time: O(n²) Space: O(1)

Legend:

Unsorted
Comparing
Swapping
Sorted