Middle Of A Linked List
given a singly linked list with head node head, return a middle node of linked list.Input Format
if there is 2 mid node then return first mid node.
1->2->3->4->5->6->7->nullOutput Format
1->2->3->4->5->6->null
4->5->6->7->nullQuestion Video
3->4->5->6->null
0 <= N <= 10^6Sample Input
7Sample Output
1 2 3 4 5 6 7
4 5 6 7
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run