Middle of a Linked List
Find the middle node of a linked list.
Input: 0 1 2 3 4
Output: 2
If the number of nodes is even, then return the second middle node.
Input: 0 1 2 3 4 5
Output: 3
You are on levelĀ Student
Find the middle node of a linked list.
Input: 0 1 2 3 4
Output: 2
If the number of nodes is even, then return the second middle node.
Input: 0 1 2 3 4 5
Output: 3
Monster Assistant is thinking...