Skip to content

Commit ab95c61

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c2b2c4d commit ab95c61

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sorts/merge_sort.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ def merge(left: list, right: list) -> list:
4040
left_length = len(left)
4141
right_length = len(right)
4242
left_index = right_index = 0
43-
43+
4444
while (left_index < left_length) and (right_index < right_length):
4545
if left[left_index] < right[right_index]:
4646
result.append(left[left_index])
4747
left_index += 1
4848
else:
4949
result.append(right[right_index])
5050
right_index += 1
51-
52-
result.extend(left[left_index : ])
53-
result.extend(right[right_index : ])
51+
52+
result.extend(left[left_index:])
53+
result.extend(right[right_index:])
5454
return result
5555

5656
if len(collection) <= 1:

0 commit comments

Comments
 (0)