Skip to content

Commit 238680d

Browse files
authored
Clean up spacing in binary_search.py
Removed unnecessary spaces before and after the return statement and the result assignment.
1 parent cad2dac commit 238680d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

searches/binary_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def binary_search(sorted_collection: list[int], item: int) -> int:
201201
raise ValueError("sorted_collection must be sorted in ascending order")
202202
left = 0
203203
right = len(sorted_collection) - 1
204-
result = -1
204+
result = -1
205205
while left <= right:
206206
midpoint = left + (right - left) // 2
207207
current_item = sorted_collection[midpoint]
@@ -212,7 +212,7 @@ def binary_search(sorted_collection: list[int], item: int) -> int:
212212
right = midpoint - 1
213213
else:
214214
left = midpoint + 1
215-
return result
215+
return result
216216

217217

218218
def binary_search_std_lib(sorted_collection: list[int], item: int) -> int:

0 commit comments

Comments
 (0)