You are given the head of a singly linked list.
Your task is to find and return the middle node of this linked list. If the list contains an even number of nodes, you must return the second of the two middle nodes.
1 → 2 → 3 → null
2 → 3 → null
The list has 3 nodes. The middle node is the one with value 2.
1 → 2 → 3 → 4 → null
3 → 4 → null
The list has 4 nodes. The middle nodes are 2 and 3, so we return the second one, which has value 3.
1 → 2 → 3 → null
2 → 3 → null