Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. class Solution:
  2.     def middleNode(self, head: ListNode) -> ListNode:
  3.         slow = head
  4.         fast = head
  5.         while fast and fast.next:
  6.             fast = fast.next.next
  7.             slow = slow.next
  8.         return slow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement