Given the head of a singly linked list and an integer n, remove the nth node counted from the end.
Return the list's head after the removal. Each node has the shape { val, next }.
Inputhead = [1, 2, 3, 4, 5], n = 2
Output[1, 2, 3, 5]
Inputhead = [1], n = 1
Output[]
1 ≤ n ≤ number of nodes ≤ 30