From 62d24124826410b40bde8e25f8692c22508f137e Mon Sep 17 00:00:00 2001 From: Hardik Pawar Date: Thu, 3 Oct 2024 11:40:56 +0530 Subject: [PATCH] Fix --- data_structures/linked_list/merge_sort_linked_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_structures/linked_list/merge_sort_linked_list.py b/data_structures/linked_list/merge_sort_linked_list.py index 9bebf0b5c..b8ba5d200 100644 --- a/data_structures/linked_list/merge_sort_linked_list.py +++ b/data_structures/linked_list/merge_sort_linked_list.py @@ -44,10 +44,10 @@ def get_middle(head: Node | None) -> Node | None: if head is None or head.next is None: return head - slow = head # one node at a time + slow: Node | None = head # one node at a time fast = head # two nodes at a time while fast.next and fast.next.next: - slow: Node | None = slow.next + slow = slow.next fast = fast.next.next return slow