-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Bubble sort is a simple 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. It gets its name because smaller elements "bubble" to the top of the list with each iteration.
Time Complexity:
Best Case: O(n)
Average Case: O(n^2)
Worst Case: O(n^2)
Metadata
Metadata
Assignees
Labels
No labels