Commit 45f3158d by BellCodeEditor

save project

parent c42b7aaa
Showing with 1 additions and 1 deletions
...@@ -8,7 +8,7 @@ def brinary_search(alist,num): ...@@ -8,7 +8,7 @@ def brinary_search(alist,num):
mid = (low + high)//2 mid = (low + high)//2
guess = alist[mid] guess = alist[mid]
if guess == num: if guess == num:
return mid
elif guess < num: elif guess < num:
low = mid + 1 low = mid + 1
else: else:
......
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