Bubble Sort
Bubble Sort is an extremely basic and inefficient method for sorting . Bubble Sort uses the method of Comparison for sorting.
In the worst case, total comparisons can go upto n2 i.e. O(n2) where n is the size of input.
Comparisons
example dataset [3,2,5,4,6,1]
for i->0 to size-1
for j->0 to size-1
if a[j]>a[j+1]
swap(a[j],a[j+1])
else
Continue