Update binary_search.py

This commit is contained in:
marina 2023-07-31 14:59:00 -07:00 committed by GitHub
parent 2396654457
commit 398c10877c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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