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 47b3ea8 commit 60f0bb9Copy full SHA for 60f0bb9
sorts/merge_sort.py
@@ -38,7 +38,7 @@ def merge(left: list, right: list) -> list:
38
"""
39
result = []
40
left_index = right_index = 0
41
- length_left , length_right = len(left) , len(right)
+ length_left, length_right = len(left), len(right)
42
43
while (left_index < length_left) and (right_index < length_right):
44
if left[left_index] < right[right_index]:
@@ -48,8 +48,8 @@ def merge(left: list, right: list) -> list:
48
result.append(right[right_index])
49
right_index += 1
50
51
- result.extend(left[left_index: ])
52
- result.extend(right[right_index: ])
+ result.extend(left[left_index:])
+ result.extend(right[right_index:])
53
return result
54
55
if len(collection) <= 1:
0 commit comments