You are given a singly linked list. Find its middle node.
If the list has an even number of nodes, there are two middle nodes. In that case, take the second one.
The middle node is shown as the part of the list that starts at the middle node and runs to the end.
How the judge passes the data
Examples
Example 1:
Input: head = [10,20,30]
Output: [20,30]
Explanation: The middle node is 20. The list from 20 to the end is 20, 30.
Example 2:
Input: head = [4,8,15,16]
Output: [15,16]
Explanation: The two middle nodes are 8 and 15. We take the second one, 15.
Example 3:
Input: head = [7]
Output: [7]
Explanation: With one node, that node is the middle.