Remove Nth Node From End of List
Given the head of a linked list, remove the nth node from the end of the list and return its head.
Remove Nth Node From End of List

Given the head of a linked list, remove the nth node from the end of the list and return its head.

Example 1:
Input: {"head":[1,2,3,4,5],"n":2}
Output: [1,2,3,5]
Input
arr ={"head":[1,2,3,4,5],"n":2}

Init dummy, left=dummy, right=head

left

0

right

1

2

3

4

5

NULL
Variables
No variables to display
DepthFunction Call
Stack empty
0/12