mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Fix comments
This commit is contained in:
parent
121bfdae5f
commit
809e74b7f2
|
@ -156,9 +156,9 @@ def merge_sort_linked_list(head: Node | None) -> Node | None:
|
|||
next_to_middle = middle.next
|
||||
middle.next = None # Split the list into two parts
|
||||
|
||||
left = merge_sort_linked_list(head) # Sort the left half
|
||||
right = merge_sort_linked_list(next_to_middle) # Sort the right half
|
||||
sorted_list = merge(left, right) # Merge the sorted halves
|
||||
left = merge_sort_linked_list(head) # Sort left half
|
||||
right = merge_sort_linked_list(next_to_middle) # Sort right half
|
||||
sorted_list = merge(left, right) # Merge sorted halves
|
||||
return sorted_list
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user