We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4aa953e commit 62d2412Copy full SHA for 62d2412
data_structures/linked_list/merge_sort_linked_list.py
@@ -44,10 +44,10 @@ def get_middle(head: Node | None) -> Node | None:
44
if head is None or head.next is None:
45
return head
46
47
- slow = head # one node at a time
+ slow: Node | None = head # one node at a time
48
fast = head # two nodes at a time
49
while fast.next and fast.next.next:
50
- slow: Node | None = slow.next
+ slow = slow.next
51
fast = fast.next.next
52
return slow
53
0 commit comments