File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -38,23 +38,23 @@ def merge(arr: list[int]) -> list[int]:
38
38
): # Runs until the lowers size of the left and right are sorted.
39
39
if left_array [left_index ] < right_array [right_index ]:
40
40
arr [index ] = left_array [left_index ]
41
- left_index = left_index + 1
41
+ left_index += 1
42
42
else :
43
43
arr [index ] = right_array [right_index ]
44
- right_index = right_index + 1
45
- index = index + 1
44
+ right_index += 1
45
+ index += 1
46
46
while (
47
47
left_index < left_size
48
48
): # Adds the left over elements in the left half of the array
49
49
arr [index ] = left_array [left_index ]
50
- left_index = left_index + 1
51
- index = index + 1
50
+ left_index += 1
51
+ index += 1
52
52
while (
53
53
right_index < right_size
54
54
): # Adds the left over elements in the right half of the array
55
55
arr [index ] = right_array [right_index ]
56
- right_index = right_index + 1
57
- index = index + 1
56
+ right_index += 1
57
+ index += 1
58
58
return arr
59
59
60
60
You can’t perform that action at this time.
0 commit comments