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: