From ead0e74674b588d965bb85a22e08aa1343f5af2b Mon Sep 17 00:00:00 2001 From: Austin Green Date: Wed, 27 Sep 2017 22:53:54 -0400 Subject: [PATCH] Implement floor division (#8) --- utilities/python/binary_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/python/binary_search.py b/utilities/python/binary_search.py index 83842b8e..1549fa94 100644 --- a/utilities/python/binary_search.py +++ b/utilities/python/binary_search.py @@ -2,7 +2,7 @@ def binary_search(arr, target): left = 0; right = len(arr) - 1 while left < right: - mid = left + (right - left) / 2; + mid = left + (right - left) // 2; if arr[mid] == target: return mid elif arr[mid] < target: