From 24ade1c8f3ee92cf3a3d4a567c19642c128e15b5 Mon Sep 17 00:00:00 2001 From: "Md. Jahidul Islam" <96673050+the-jahid@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:45:27 +0600 Subject: [PATCH] Add link to bubble sort algorithm (#5541) * Update 100-bubble-sort.md Adding bubble sort link from w3 school * Update src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/100-bubble-sort.md --------- Co-authored-by: Kamran Ahmed --- .../content/105-sorting-algorithms/100-bubble-sort.md | 2 ++ 1 file changed, 2 insertions(+) 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 626ee0c5a162..583c4c1ec00e 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)