feat: add new Median Search implementation (#1992)

* feat: add new median search algorithm with linked list

* Removed filename

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

* Update search/median_search2.cpp

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

* Update search/median_search2.cpp

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

* Update search/median_search2.cpp

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

* Update search/median_search2.cpp

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

* fix: Requested changes made

* Update search/median_search2.cpp

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

* Update search/median_search2.cpp

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

* Update search/median_search2.cpp

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

* Added algorithm and implementation explanations. Also added wikipedia link.

* Update search/median_search2.cpp

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

* Added @brief and wikipedia link to algo

* Update search/median_search2.cpp

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

* moved includes to top of file

* fix: clang-tidy fixes applied

* fix: clang-tidy fixes

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for b24ca86e

* Update search/median_search2.cpp

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

* clang-format and clang-tidy fixes for 247e0616

* fix: fixed test case failing

* clang-format and clang-tidy fixes for 4c1400db

* fix: test cases now pass

* clang-format and clang-tidy fixes for f3027971

* Update search/median_search2.cpp

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

* Update search/median_search2.cpp

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

* clang-format and clang-tidy fixes for b8b5f5fd

* clang-format and clang-tidy fixes for d67d450c

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
weiss-ben
2022-09-26 19:28:55 +03:00
committed by GitHub
parent 0febbf0314
commit 1645cf281f
3 changed files with 159 additions and 32 deletions

View File

@@ -318,6 +318,7 @@
* [Jump Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/jump_search.cpp)
* [Linear Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/linear_search.cpp)
* [Median Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/median_search.cpp)
* [Median Search2](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/median_search2.cpp)
* [Saddleback Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/saddleback_search.cpp)
* [Sublist Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/sublist_search.cpp)
* [Ternary Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/ternary_search.cpp)