Commit 5fbaa8f7 by BellCodeEditor

auto save

parent bd8579ee
Showing with 3 additions and 2 deletions
...@@ -15,7 +15,7 @@ def binary_search(alist,num): ...@@ -15,7 +15,7 @@ def binary_search(alist,num):
if guess == num: if guess == num:
return mid return mid
elif guess < num: elif guess < num:
low=mid-1 low=mid+1
else: else:
high = mid+1 high = mid-1
print(binary_search) print(binary_search)
\ No newline at end of file
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