We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2174e74 commit f8fd6a6Copy full SHA for f8fd6a6
binary_search.py
@@ -2,7 +2,7 @@ def binary_search(L,x):
2
left, right = 0, len(L)-1
3
4
while left <= right :
5
- mid = left + right//2
+ mid = (left + right)//2
6
if L[mid] == x:
7
return mid
8
elif L[mid]<x:
0 commit comments