This commit is contained in:
Hardik Pawar 2024-10-03 11:35:54 +05:30
parent 81d2d511d8
commit 6211693833

View File

@ -160,10 +160,6 @@ def merge_sort_linked_list(head: Node | None) -> Node | None:
right = merge_sort_linked_list(next_to_middle) # Sort right half
# Merge sorted halves
if left is None:
return right
if right is None:
return left
sorted_list = merge(left, right)
return sorted_list