diff --git a/data_structures/linked_list/merge_sort_linked_list.py b/data_structures/linked_list/merge_sort_linked_list.py index 7e93b63a4..844bbae90 100644 --- a/data_structures/linked_list/merge_sort_linked_list.py +++ b/data_structures/linked_list/merge_sort_linked_list.py @@ -20,7 +20,7 @@ class Node: self.next: Node | None = None -def get_middle(head: Node | None) -> Node | None: +def get_middle(head: Node) -> Node: """ Find the middle node of the linked list using the slow and fast pointer technique.