bubble sort
Bubble sort is a simple sorting algorithm that repeatedly steps through a list, compares adjacent elements, and swaps them if they are in the wrong order. This process continues until no more swaps are needed, indicating that the list is sorted. The algorithm gets its name because smaller elements "bubble" to the top of the list.
Although bubble sort is easy to understand and implement, it is not very efficient for large datasets. Its average and worst-case time complexity is O(n²), where n is the number of items being sorted. More efficient algorithms, like quick sort or merge sort, are often preferred for larger lists.