Given the head of a singly linked list, return the middle node (the second middle if there are two). The output prints the list from that node to the end.
Input: one line of space-separated integers — the list values. Output: values from the middle node onward, space-separated.
1 2 3 4 5
3 4 5
1 2 3 4 5 6
4 5 6
Two middles (3, 4) — return the second.
Run your code against the sample tests, or Submit to run the full suite.