feat: add random pivot quick sort algorithm (#1510)

* feat: add random pivot quick sort algorithm, test cases included

* updating DIRECTORY.md

* docs: add proper docs for random pivot quick sort algorithm, code reformatted.

* fix: copy constructor bug fixed for TestCase class for random pivot quick sort algo

* docs and code reformatted according to standards

* c-style array declarations removed

* added minor suggestion in docs

* resource link added in docs

* docs formatted

* test function's docs added, using stl function for swap

* generator function migrated to namespace

* Update sorting/random_pivot_quick_sort.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/random_pivot_quick_sort.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/random_pivot_quick_sort.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* docs fixed sorting/random pivot quick sort

* Apply suggestions from code review

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Nitin Sharma
2021-07-06 22:49:27 +05:30
committed by GitHub
parent 0c5c096991
commit 60ee52fd6a
2 changed files with 310 additions and 0 deletions

View File

@@ -298,6 +298,7 @@
* [Quick Sort 3](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/quick_sort_3.cpp)
* [Radix Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/radix_sort.cpp)
* [Radix Sort2](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/radix_sort2.cpp)
* [Random Pivot Quick Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/random_pivot_quick_sort.cpp)
* [Recursive Bubble Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/recursive_bubble_sort.cpp)
* [Selection Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/selection_sort.cpp)
* [Shell Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/shell_sort.cpp)