Skip to content

Commit 62d2412

Browse files
committed
Fix
1 parent 4aa953e commit 62d2412

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data_structures/linked_list/merge_sort_linked_list.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ def get_middle(head: Node | None) -> Node | None:
4444
if head is None or head.next is None:
4545
return head
4646

47-
slow = head # one node at a time
47+
slow: Node | None = head # one node at a time
4848
fast = head # two nodes at a time
4949
while fast.next and fast.next.next:
50-
slow: Node | None = slow.next
50+
slow = slow.next
5151
fast = fast.next.next
5252
return slow
5353

0 commit comments

Comments
 (0)