mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 23:11:09 +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
|
next_to_middle = middle.next
|
||||||
middle.next = None # Split the list into two parts
|
middle.next = None # Split the list into two parts
|
||||||
|
|
||||||
left = merge_sort_linked_list(head) # Sort the left half
|
left = merge_sort_linked_list(head) # Sort left half
|
||||||
right = merge_sort_linked_list(next_to_middle) # Sort the right half
|
right = merge_sort_linked_list(next_to_middle) # Sort right half
|
||||||
sorted_list = merge(left, right) # Merge the sorted halves
|
sorted_list = merge(left, right) # Merge sorted halves
|
||||||
return sorted_list
|
return sorted_list
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user