A linked list is given as an array of values in order (e.g. `[1,2,3,4,5]`). Implement `removeNthFromEnd(arr, n)` that removes the **n-th node from the end** of the list and returns the resulting array. `n` is always valid (1 ≤ n ≤ arr.length). Example: `removeNthFromEnd([1,2,3,4,5], 2)` → `[1,2,3,5]` (the 2nd from end, which is `4`, is removed).
Run your code to see results.