mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-27 17:06:44 +00:00
Changed the typographical error (#132)
Changed the typo in line 113 and 115 regarding recursive binary search algorithm, found by a user who commented in comments.
This commit is contained in:
parent
f9156cfb71
commit
e0211794da
@ -113,7 +113,7 @@ def binary_search_by_recursion(sorted_collection, item, left, right):
|
|||||||
return binary_search_by_recursion(sorted_collection, item, left, midpoint-1)
|
return binary_search_by_recursion(sorted_collection, item, left, midpoint-1)
|
||||||
else:
|
else:
|
||||||
return binary_search_by_recursion(sorted_collection, item, midpoint+1, right)
|
return binary_search_by_recursion(sorted_collection, item, midpoint+1, right)
|
||||||
|
|
||||||
def __assert_sorted(collection):
|
def __assert_sorted(collection):
|
||||||
"""Check if collection is sorted, if not - raises :py:class:`ValueError`
|
"""Check if collection is sorted, if not - raises :py:class:`ValueError`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user