Remove Nth Node From End Of Linkedlist
Given a singly linklist, remove the nth node from the end of the list and return its head.Input Format
1->7->2->6->3->5->4->nullOutput Format
2
1->7->2->6->3->4->nullQuestion Video Constraints
1 <= size Of LinkedList <= 10^6Sample Input
1 <= n <= 10^6
9Sample Output
18 1 16 11 15 7 9 16 4
1
18 1 16 11 15 7 9 16
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run