Bubble Sort
Sorting is the process of arranging the data in some logical order. Bubble sort is an algorithm to sort various linear data structures.
he logical order can be ascending and descending in the case of numeric values or dictionary order in the case of alphanumeric values.
- Bubble Sort is a very simple and easy to implement sorting technique.
- In the bubble sort technique, each pair of element is compared.
- Elements are swapped if they are not in order.
- The worst-case complexity of bubble sort is O(n2).