mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-02 06:46:18 -04:00
Update binary_search.py
This commit is contained in:
parent
2396654457
commit
398c10877c
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ def binary_search_iterative(array, item):
|
|||
lower, higher = 0, len(array)
|
||||
|
||||
while lower < higher:
|
||||
mid = (highe r+ lower) // 2
|
||||
mid = (higher + lower) // 2
|
||||
|
||||
if array[mid] == item:
|
||||
return mid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue