class Solution {
    public ListNode middleNode(ListNode head) {
        
        ListNode slow = head; 
        ListNode fast = head; 
        while (fast.next != null) {
            //one step
            slow = slow.next; 
            fast = fast.next.next; 
        }
        return slow; 
    }
}