Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Permalink
Browse files

make code more readable (#1304)

  • Loading branch information...
shellhub authored and cclauss committed Oct 8, 2019
1 parent 25701a9 commit 0da4d0a7f35c825447aa4666bb073a3ad118f319
Showing with 3 additions and 4 deletions.
  1. +3 −4 searches/binary_search.py
@@ -43,11 +43,10 @@ def binary_search(sorted_collection, item):
current_item = sorted_collection[midpoint]
if current_item == item:
return midpoint
elif item < current_item:
right = midpoint - 1
else:
if item < current_item:
right = midpoint - 1
else:
left = midpoint + 1
left = midpoint + 1
return None


0 comments on commit 0da4d0a

Please sign in to comment.
You can’t perform that action at this time.