• Bubble sort steps through a list and compares pairs of adjacent
numbers.The numbers are swapped if they are in the wrong
order. For an ascending list if the left number is bigger than the
right number the items are swapped otherwise the numbers are
not swapped.
• The algorithm repeatedly passes through the list until no more swaps are needed.