Skip to main content

Sorting Algorithms

Bubble Sort

Named as sinking sort. Compare each pair of the adjacent items and swap them if they are in the wrong order.

Worst case and average case time complexity both O(n^2)  and best case time complexity is O(n).


Comments