Skip to content

Commit 219a4c8

Browse files
ryuta69cclauss
ryuta69
andauthored
Refactor doubled process in if-condition into one outside of if-condition
Co-authored-by: Christian Clauss <[email protected]>
1 parent 880b0ac commit 219a4c8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sorts/merge_insertion_sort.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ def binary_search_insertion(sorted_list, item):
4040
if left == right:
4141
if sorted_list[middle] < item:
4242
left = middle + 1
43-
break
44-
else:
45-
break
43+
break
4644
elif sorted_list[middle] < item:
4745
left = middle + 1
4846
else:

0 commit comments

Comments
 (0)