Bubble sort

About the algorithm:

Adjacent elements are swapped until list is sorted


Categories:  Sort   Inefficient  
Best case: Ω(n)
Worst case: O(n^2)

Try the algorithm: