removeNthFromEnd = function(head, n) {
    const length = getNthFromEnd(head, n);/* Time O(N) */

    const isHead = length < 0;
    if (isHead) return head.next;

    const curr = moveNode(head, length);  /* Time O(N) */

    curr.next = curr.next.next;

    return head
}
https://leetcode.com/problems/remove-nth-node-from-end-of-list/
Time O(N) | Space O(1)
@param {ListNode} head
@param {number} n
@return {ListNode}