Skip to content
Permalink
Browse files
Fixed midpoint calculation
  • Loading branch information
hortonr6 committed Jul 22, 2019
1 parent bf30e99 commit aa5d7c4bd529a117da403d37e0ab5b29e5e7eb84
Showing 1 changed file with 1 addition and 1 deletion.
@@ -23,7 +23,7 @@ def binarySearch(target, data):

while start <= end:
#Calculates midpoint within the list
midpoint = start + ((end - start) // 2)
midpoint = (start + end) // 2
if data[midpoint] == target:
return data[midpoint]
elif data[midpoint] < target:

0 comments on commit aa5d7c4

Please sign in to comment.