What is bubble sort?
Bubble Sort:
The basic idea in bubble sort is to scan the array to be sorted sequentially various times. Every pass puts the largest element in its correct position by comparing very element in the array with its successor and interchanging the two elements if they are not in sequence order.