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 Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
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 Added double linear search recursion (#2445) 2020-09-18 09:55:02 +02:00
double_linear_search.py from __future__ import annotations (#2464) 2020-09-23 13:30:13 +02:00
fibonacci_search.py Pyupgrade to Python 3.9 (#4718) 2021-09-07 13:37:03 +02:00
hill_climbing.py The black formatter is no longer beta (#5960) 2022-01-30 20:29:54 +01:00
interpolation_search.py pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
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 Shortened code (#3855) 2020-11-01 15:38:11 +08:00
sentinel_linear_search.py contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
simple_binary_search.py Remove useless code in doctests (#7733) 2022-10-27 22:52:00 +02:00
simulated_annealing.py The black formatter is no longer beta (#5960) 2022-01-30 20:29:54 +01:00
tabu_search.py pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
tabu_test_data.txt .txt instead of .py 2018-10-19 17:38:11 -05:00
ternary_search.py pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30