Java two pointers solution
\nclass Solution {\n    public ListNode middleNode(ListNode head) {\n        ListNode slow = head;\n        ListNode fast = head.next;\n        while (fast != n
```\nclass Solution {\n    public ListNode middleNode(ListNode head) {\n        ListNode slow = head;\n        ListNode fast = head.next;\n        while (fast != null) {\n            slow = slow.next;\n            if (fast.next == null) {\n                fast = fast.next;\n            } else {\n                fast = fast.next.next;\n            }\n        }\n        return slow;\n    }\n}\n```
[]