Bubble Sort


Bubble Sort is a simple brute force sorting algorithm. It works by comparing and swapping adjacent elements based on the sort condition. Bubble sort is implemented by using two loops and it can be enhanced by using a flag to exit the outer loop if there was no swapping in the inner loop.