Python/searches
Ant Fitch 53681f199c
Fixed error in binary_search_by_recursion
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.
2018-01-30 18:50:07 -08:00
..
binary_search.py Fixed error in binary_search_by_recursion 2018-01-30 18:50:07 -08:00
interpolation_search.py Modernize Python 2 code to get ready for Python 3 2017-11-25 10:23:50 +01:00
jump_search.py Modernize Python 2 code to get ready for Python 3 2017-11-25 10:23:50 +01:00
linear_search.py Modernize Python 2 code to get ready for Python 3 2017-11-25 10:23:50 +01:00
quick_select.py Create quick_select.py 2017-10-09 17:26:27 -04:00
ternary_search.py Modernize Python 2 code to get ready for Python 3 2017-11-25 10:23:50 +01:00