We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b3f61f commit dc4282fCopy full SHA for dc4282f
Chapter09/bin_search.py
@@ -8,7 +8,7 @@ def binary_search(ordered_list, term):
8
index_of_last_element = size_of_list
9
10
while index_of_first_element <= index_of_last_element:
11
- mid_point = (index_of_first_element + index_of_last_element)/2
+ mid_point = (index_of_first_element + index_of_last_element) // 2
12
13
if ordered_list[mid_point] == term:
14
return mid_point
0 commit comments