We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cebed6 commit c5365d6Copy full SHA for c5365d6
1 file changed
algorithms/searching/binary_search.py
@@ -29,7 +29,7 @@ def search(seq, key):
29
if seq[mid] < key:
30
lo = mid + 1
31
elif seq[mid] > key:
32
- hi = mid
+ hi = mid - 1
33
else:
34
return mid
35
return False
0 commit comments