Examples
Input: list = [1,2,3,4,5,6], n = 3
Output: [1,2,3,5,6]
Explanation: The 3rd node from the end is 4. Deleting it results in the list [1, 2, 3, 5, 6].
Input: list = [8], n = 1
Output: []
Explanation: The list contains only one node, which is the 1st from the end. Deleting it results in an empty list.
Input: list = [9,7], n = 1
Output: [9]
Explanation: The 1st node from the end is 7. Deleting it results in the list [9].