Skip to content

Commit 76ce355

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

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
@@ -38,8 +38,8 @@ def merge(left: list, right: list) -> list:
3838
"""
3939
result = []
4040
left_index = right_index = 0
41-
length_left , length_right = len(left) , len(right)
42-
41+
length_left, length_right = len(left), len(right)
42+
4343
while (left_index < length_left) and (right_index < length_right):
4444
if left[left_index] < right[right_index]:
4545
result.append(left[left_index])
@@ -48,8 +48,8 @@ def merge(left: list, right: list) -> list:
4848
result.append(right[right_index])
4949
right_index += 1
5050

51-
result.extend(left[left_index: ])
52-
result.extend(right[right_index: ])
51+
result.extend(left[left_index:])
52+
result.extend(right[right_index:])
5353
return result
5454

5555
if len(collection) <= 1:

0 commit comments

Comments
 (0)