Bubblesort

Bubble Sort is a simple comparison-based sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. This process is repeated until the list is sorted. Although easy to implement, its worst-case and average-case time complexity of \(O(n^2)\) makes it inefficient on large datasets.