2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,7 +1,7 @@
|
|||
def binary_search(l, value, low = 0, high = -1):
|
||||
if not l: return -1
|
||||
if(high == -1): high = len(l)-1
|
||||
if low == high:
|
||||
if low >= high:
|
||||
if l[low] == value: return low
|
||||
else: return -1
|
||||
mid = (low+high)//2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue