Bubble Sort

Repeatedly swaps adjacent elements if they are in the wrong order. Stops early if no swaps occur.

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