Skip to content

Commit 15578e8

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sorts/adaptive_merge_sort.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def adaptive_merge_sort(sequence: list) -> list:
2424
print(f"Sorted sequence: {sequence}")
2525
return sequence
2626

27+
2728
def adaptive_merge_sort_helper(array: list, aux: list, low: int, high: int) -> None:
2829
"""
2930
Helper function for Adaptive Merge Sort algorithm.
@@ -50,6 +51,7 @@ def adaptive_merge_sort_helper(array: list, aux: list, low: int, high: int) -> N
5051
return
5152
merge(array, aux, low, mid, high)
5253

54+
5355
def merge(array: list, aux: list, low: int, mid: int, high: int) -> None:
5456
"""
5557
Merges two sorted subarrays of the main array.
@@ -73,5 +75,7 @@ def merge(array: list, aux: list, low: int, mid: int, high: int) -> None:
7375
else:
7476
aux[k] = array[i]
7577
i += 1
76-
array[low:high + 1] = aux[low:high + 1] # Update the main array with merged values
78+
array[low : high + 1] = aux[
79+
low : high + 1
80+
] # Update the main array with merged values
7781
print(f"After merge: {aux[low:high + 1]}")

0 commit comments

Comments
 (0)