From 5dda56b5ca5f79f8b524e52cc52db39af767e0fa Mon Sep 17 00:00:00 2001 From: Lucas Dondo <59975541+LucasDondo@users.noreply.github.com> Date: Wed, 28 Aug 2024 05:40:56 -0300 Subject: [PATCH] Enhanced formatting (#6849) --- .../content/105-sorting-algorithms/104-selection-sort.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/104-selection-sort.md b/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/104-selection-sort.md index 94d797c40..3964740cd 100644 --- a/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/104-selection-sort.md +++ b/src/data/roadmaps/datastructures-and-algorithms/content/105-sorting-algorithms/104-selection-sort.md @@ -1,3 +1,3 @@ # Selection Sort -Selection Sort is a simple and intuitive sorting algorithm. It works by dividing the array into two parts - sorted and unsorted. Initially, the sorted part is empty and the unsorted part contains all the elements. The algorithm repeatedly selects the smallest (or largest, if sorting in descending order) element from the unsorted part and moves that to the end of the sorted part. The process continues until the unsorted part becomes empty and the sorted part contains all the elements. Selection sort is not efficient on large lists, as its time complexity is O(n²) where n is the number of items. \ No newline at end of file +Selection Sort is a simple and intuitive sorting algorithm. It works by dividing the array into two parts - sorted and unsorted. Initially, the sorted part is empty and the unsorted part contains all the elements. The algorithm repeatedly selects the smallest (or largest, if sorting in descending order) element from the unsorted part and moves that to the end of the sorted part. The process continues until the unsorted part becomes empty and the sorted part contains all the elements. Selection sort is not efficient on large lists, as its time complexity is $O(n²)$ where $n$ is the number of items.