Bubble Sort is one of the most simple forms of sorting is that of comparing each item with every other item in some list, however as the description may imply this form of sorting is not particularly efficient O(n2).
Bubble Sort compares all the element one by one and sort them based on their values. It is called Bubble sort, because with each iteration the largest element in the list bubbles up towards the last place, just like a water bubble rises up to the water surface.
Sorting takes place by stepping through all the data items one-by-one in pairs and comparing adjacent data items and swapping each pair that is out of order. It works by repeatedly swapping the adjacent elements if they are in wrong order.
In it’s most simple form bubble sort can be implemented as two loops.
That’s it for this one !!!