Implement floor division (#8)

pull/12/head
Austin Green 7 years ago committed by Yangshun Tay
parent 316c6f3e5b
commit ead0e74674

@ -2,7 +2,7 @@ def binary_search(arr, target):
left = 0; left = 0;
right = len(arr) - 1 right = len(arr) - 1
while left < right: while left < right:
mid = left + (right - left) / 2; mid = left + (right - left) // 2;
if arr[mid] == target: if arr[mid] == target:
return mid return mid
elif arr[mid] < target: elif arr[mid] < target:

Loading…
Cancel
Save