Statementâ–¼
Given the head
of a singly linked list and an integer n
, remove the n
th
node from the end of the list and return the head
of the modified list.
Constraints:
The number of nodes in the list is
k .1≤ k ≤103 −103≤ Node.value
≤103 1≤ n
≤k