mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-24 13:31:07 +00:00
53681f199c
In binary_search_by_recursion, if you search array for a value that does not exist, you will get this error: RecursionError: maximum recursion depth exceeded in comparison To fix this, first check to make sure that the value is between left and right points like this: if (right < left): return None A similar construct has already been applied to binary_search, but did not exist in the recursive alternative. |
||
---|---|---|
.. | ||
binary_search.py | ||
interpolation_search.py | ||
jump_search.py | ||
linear_search.py | ||
quick_select.py | ||
ternary_search.py |