Commit a61abce7 by BellCodeEditor

save project

parent c360dacd
Showing with 1 additions and 1 deletions
...@@ -14,7 +14,7 @@ def binary_search(alist,num): ...@@ -14,7 +14,7 @@ def binary_search(alist,num):
mid=(minIndex+minIndex)//2 mid=(minIndex+minIndex)//2
if alist[mid]==num: if alist[mid]==num:
return mid return mid
elif alist[mid]>mid: elif alist[mid]>num:
maxIndex=mid-1 maxIndex=mid-1
else: else:
minIndex=mid+1 minIndex=mid+1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment