Python/searches
Kiarash Hajian b814cf3781
add exponential search algorithm (#10732)
* add exponential_search algorithm

* replace binary_search with binary_search_recursion

* convert left type to int to be useable in binary_search_recursion

* add docs and tests for exponential_search algorithm

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* move exponential_search to binary_search.py to pass github auto build tests

delete exponential_search.py file

* Update searches/binary_search.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* remove additional space  searches/binary_search.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* return single data type in exponential_search searches/binary_search.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* add doctest mod searches/binary_search.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* use // instread of int() convert  searches/binary_search.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* change test according to new code searches/binary_search.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* fix binary_search_recursion multiple type return error

* add a timeit benchmark for exponential_search

* sort input of binary search to be equal in performance test with exponential_search

* raise value error instead of sorting input in binary and exonential search to fix bugs

* Update binary_search.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: user <user@kali.user>
2023-10-21 20:53:34 +02:00
..
__init__.py
binary_search.py add exponential search algorithm (#10732) 2023-10-21 20:53:34 +02:00
binary_tree_traversal.py Correct ruff failures (#8732) 2023-05-14 22:03:13 +01:00
double_linear_search_recursion.py
double_linear_search.py
fibonacci_search.py
hill_climbing.py
interpolation_search.py
jump_search.py improvements to jump_search.py (#8932) 2023-08-08 14:47:09 -07:00
linear_search.py Fix linear_search docstring return value (#8644) 2023-07-30 18:32:05 -07:00
median_of_medians.py Added Median of Medians Algorithm (#9864) 2023-10-09 08:41:30 +13:00
quick_select.py
sentinel_linear_search.py
simple_binary_search.py
simulated_annealing.py
tabu_search.py
tabu_test_data.txt
ternary_search.py