diff --git a/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/100-bubble-sort.md b/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/100-bubble-sort.md index 626ee0c5a..583c4c1ec 100644 --- a/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/100-bubble-sort.md +++ b/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/100-bubble-sort.md @@ -1,3 +1,5 @@ # Bubble Sort Bubble Sort is a simple sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong order. It gets its name because with each iteration the largest element "bubbles" up to its proper location. It continues this process of swapping until the entire list is sorted in ascending order. The main steps of the algorithm are: starting from the beginning of the list, compare every pair of adjacent items and swap them if they are in the wrong order, and then pass through the list until no more swaps are needed. However, despite being simple, Bubble Sort is not suited for large datasets as it has a worst-case and average time complexity of O(n²), where n is the number of items being sorted. + +- [Bubble Sort](https://www.w3schools.com/dsa/dsa_algo_bubblesort.php)