From 7f1f58516eba386253ecd8f231574acdacd4bfb2 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Fri, 5 Jul 2024 18:01:23 +0530 Subject: [PATCH] DSA | Updated 105, Sorting Algorithm links (#6063) * DSA | Updated 105, Sorting Algorithm links * Update src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/101-merge-sort.md --------- Co-authored-by: dsh --- .../102-data-structures/100-what-are-datastructures.md | 6 +++--- .../content/105-sorting-algorithms/100-bubble-sort.md | 5 +++++ .../content/105-sorting-algorithms/101-merge-sort.md | 5 +++++ .../content/105-sorting-algorithms/103-quick-sort.md | 7 ++++--- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/data/roadmaps/datastructures-and-algorithms/content/102-data-structures/100-what-are-datastructures.md b/src/data/roadmaps/datastructures-and-algorithms/content/102-data-structures/100-what-are-datastructures.md index ff7353fe7..2755ed416 100644 --- a/src/data/roadmaps/datastructures-and-algorithms/content/102-data-structures/100-what-are-datastructures.md +++ b/src/data/roadmaps/datastructures-and-algorithms/content/102-data-structures/100-what-are-datastructures.md @@ -4,6 +4,6 @@ Data structures are specialized formats for organizing and storing data in a com Learn more from the following resources: -[@video@What an Algorithms and More(MIT)](https://youtu.be/Zc54gFhdpLA?si=F_1QRigN_h2t2nSp&t=133) -[@video@What Are Data Structures?](https://www.youtube.com/watch?v=bum_19loj9A) -[@video@Introduction to Algorithms](https://www.youtube.com/watch?v=0IAPZzGSbME) +- [@video@What an Algorithms and More(MIT)](https://youtu.be/Zc54gFhdpLA?si=F_1QRigN_h2t2nSp&t=133) +- [@video@What Are Data Structures?](https://www.youtube.com/watch?v=bum_19loj9A) +- [@video@Introduction to Algorithms](https://www.youtube.com/watch?v=0IAPZzGSbME) 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 f193fa0d2..565ed3742 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 @@ -2,4 +2,9 @@ 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. +Learn more from the following resources: + - [@article@Bubble Sort](https://www.w3schools.com/dsa/dsa_algo_bubblesort.php) +- [@article@Bubble Sort Visulize](https://www.hackerearth.com/practice/algorithms/sorting/bubble-sort/visualize/) +- [@video@Bubble Sort](https://www.youtube.com/watch?v=Jdtq5uKz-w4) +- [@video@Bubble Sort](https://www.youtube.com/watch?v=p__ETf2CKY4) diff --git a/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/101-merge-sort.md b/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/101-merge-sort.md index 94044847b..ce7345df6 100644 --- a/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/101-merge-sort.md +++ b/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/101-merge-sort.md @@ -1,3 +1,8 @@ # Merge Sort __Merge sort__ is a type of sorting algorithm that follows the divide-and-conquer paradigm. It was invented by John von Neumann in 1945. This algorithm works by dividing an unsorted list into `n` partitions, each containing one element (a list of one element is considered sorted), then repeatedly merging partitions to produce new sorted lists until there is only 1 sorted list remaining. This resulting list is the fully sorted list. The process of dividing the list is done recursively until it hits the base case of a list with one item. Merge sort has a time complexity of `O(n log n)` for all cases (best, average and worst), which makes it highly efficient for large data sets. + +Learn more from the following resources: + +- [@video@Merge Sort](https://www.youtube.com/watch?v=4VqmGXwpLqc) +- [@article@Merge Sort Visulize](https://www.hackerearth.com/practice/algorithms/sorting/merge-sort/visualize/) diff --git a/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/103-quick-sort.md b/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/103-quick-sort.md index 1b9f6c995..fefd07541 100644 --- a/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/103-quick-sort.md +++ b/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/103-quick-sort.md @@ -4,6 +4,7 @@ Quicksort, also known as partition-exchange sort, is an efficient, in-place sort Learn more from the following resources: -[@video@A Complete Overview of Quicksort](https://www.youtube.com/watch?v=0SkOjNaO1XY) -[@video@QuickSort](https://www.youtube.com/watch?v=7h1s2SojIRw) -[@video@QuickSort Analysis](https://www.youtube.com/watch?v=-qOVVRIZzao) +- [@video@A Complete Overview of Quicksort](https://www.youtube.com/watch?v=0SkOjNaO1XY) +- [@video@QuickSort](https://www.youtube.com/watch?v=7h1s2SojIRw) +- [@video@QuickSort Analysis](https://www.youtube.com/watch?v=-qOVVRIZzao) +- [@article@Quick Sort Visulize](https://www.hackerearth.com/practice/algorithms/sorting/quick-sort/visualize/)