Bubble sort is a simple sorting algorithm. It works by repeatedly swapping the adjacent elements if they are in wrong order. This sorting algorithm is comparison-based algorithm. Each element are swapped if they are not in order. This algorithm is not suitable for large data sets.