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 <[email protected]> * remove additional space searches/binary_search.py Co-authored-by: Christian Clauss <[email protected]> * return single data type in exponential_search searches/binary_search.py Co-authored-by: Christian Clauss <[email protected]> * add doctest mod searches/binary_search.py Co-authored-by: Christian Clauss <[email protected]> * [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 <[email protected]> * change test according to new code searches/binary_search.py Co-authored-by: Christian Clauss <[email protected]> * 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 <[email protected]> Co-authored-by: user <[email protected]>
K
Kiarash Hajian committed
b814cf3781a97c273a779823b8b8ab388417b7b4
Parent: 06edc0e
Committed by GitHub <[email protected]>
on 10/21/2023, 6:53:34 PM