Python one pass
Fast pointer runs twice as fast than slow pointer, which will land slow to the middle when fast reaches the end.\nO(n) Time / O(1) Space\n\n# Definition for sin
Fast pointer runs twice as fast than slow pointer, which will land slow to the middle when fast reaches the end.\nO(n) Time / O(1) Space\n```\n# Definition for singly-linked list.\n# class ListNode:\n#     def __init__(self, x):\n#         self.val = x\n#         self.next = None\n\nclass Solution(object):\n    def middleNode(self, head):\n        slow = fast = head\n        while fast and fast.next:\n            slow = slow.next\n            fast = fast.next.next\n        return slow\n```
['Python']