Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add the Selection Sort Recursive algorithm #1578

Merged
merged 23 commits into from
Sep 5, 2021
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
aad39f6
Create selection_sort_recursive.cpp
Tushar-K24 Aug 29, 2021
81bbe3b
Merge branch 'master' into master
Tushar-K24 Sep 1, 2021
ffb05c6
Merge branch 'master' into master
Panquesito7 Sep 1, 2021
66d6ec4
Merge branch 'master' into master
Tushar-K24 Sep 2, 2021
e4ccbe6
updating DIRECTORY.md
Sep 2, 2021
6c18dde
Add: Description of Algorithm
Tushar-K24 Sep 2, 2021
8f466c8
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 3, 2021
52542a0
clang-format and clang-tidy fixes for 8f466c86
Sep 3, 2021
df1741c
Apply suggestions from code review
Panquesito7 Sep 3, 2021
95f5ae4
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 3, 2021
b1a396e
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 3, 2021
ce65f32
Update selection_sort_recursive.cpp
Tushar-K24 Sep 3, 2021
03ccd25
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 3, 2021
0bdd1fd
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 3, 2021
5f28256
Merge branch 'master' into master
Panquesito7 Sep 3, 2021
4a69ca1
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 3, 2021
bfda366
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 3, 2021
9b0acd6
clang-format and clang-tidy fixes for bfda3660
Sep 3, 2021
8b70bf1
Merge branch 'master' into master
Tushar-K24 Sep 4, 2021
227991a
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 5, 2021
20ea30d
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 5, 2021
7a1c9e9
Update sorting/selection_sort_recursive.cpp
Tushar-K24 Sep 5, 2021
3733897
Merge branch 'master' into master
ayaankhan98 Sep 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update sorting/selection_sort_recursive.cpp
Co-authored-by: David Leal <[email protected]>
  • Loading branch information
Tushar-K24 and Panquesito7 committed Sep 3, 2021
commit 8f466c86f413470ff7ef182e14f1010b0b3a25d5
16 changes: 0 additions & 16 deletions sorting/selection_sort_recursive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,6 @@
/**
* @namespace sorting
* @brief Sorting algorithms
* Selection sort algorithm divides the input list into two parts: a sorted sublist of items which is built up from
* left to right at the front (left) of the list and a sublist of the remaining unsorted items that occupy the rest
* of the list. Initially, the sorted sublist is empty and the unsorted sublist is the entire input list. The algorithm
* proceeds by finding the smallest (or largest, depending on sorting order) element in the unsorted sublist,
* exchanging (swapping) it with the leftmost unsorted element (putting it in sorted order), and moving the sublist
* boundaries one element to the right.
*
* Implementation
* FindMinIndex
* This function finds the minimum element of the array(list) recursively by simply comparing the minimum element of
* array reduced size by 1 and compares it to the last element of the array to find the minimum of the whole array.
*
* SelectionSortRecursive
* Just like selection sort, it divides the list into two parts (i.e. sorted and unsorted), and finds the minimum of the
* unsorted array by calling FindMinIndex, swaps the minimum element with the first element of the list and then
* solves recursively for the remaining unsorted list.
*/
namespace sorting
{
Expand Down