Given the head of a singly linked list and an integer n, remove the n-th node counting from the end of the list, then return the head of the resulting list.
The list is given to you as a ListNode ({ val, next }); an empty list is null. n is always valid (1 ≤ n ≤ length). If removing the node leaves the list empty, return the empty list ([]).
[1,2,3,4,5], 2[1], 1[1,2], 1[1,2], 2[1,2,3], 3[7,8,9,10], 4