two pointer 0ms solution
```\n    public ListNode middleNode(ListNode head) {\n                     ListNode fast=head;\n                    ListNode slow=head;\n\t\t\t \n\t\t\t //slow 
```\n    public ListNode middleNode(ListNode head) {\n                     ListNode fast=head;\n                    ListNode slow=head;\n\t\t\t \n\t\t\t //slow pointer will move 1 place ahead and fast pointer will move 2 place ahead\n\t\t\t //if linked list is even then at the end  fast pointer will reach at null node ,(fast!=null) that\'s why it\'s a terminating condition\n     \t    //if linked list is odd then at the end fast pointer will reach at last node ,(fast.next!=null) that\'s why it\'s a terminating condition\n\t\t    //In these both cases slow pointer will be at middle of the linked list\n\t\t\t\n             while(fast!=null&&fast.next!=null){\n                 slow=slow.next;\n                 fast=fast.next.next;\n             }\n             return slow;\n     }\n **   If you understand this solution then please upvote it.**
['Linked List', 'Java']