The code needs one-pass only. While the drawback of this recursion solution is that it's cumulatively costing stack space thus not suitable for very long (e.g., length = tens of thousands) linked list. Actually I like the 2-pointer solution which costs O(n) time & O(1) space.

```
struct ListNode* removeNthFromEnd(struct ListNode* head, int n) {
if(n==0) return head;
static int nodes_amount = 0;
nodes_amount++;
if (head->next != NULL) removeNthFromEnd(head->next, n);
static int pos_from_tail = 0;
pos_from_tail ++;
// remove the node
if(pos_from_tail == n && n == nodes_amount) head = head->next; // current position is at original head
else if(pos_from_tail == n + 1) head->next = (head->next)->next; // current position is at one node ahead the target node
if(pos_from_tail == nodes_amount) pos_from_tail = nodes_amount = 0; // reset for next call
return head;
}
```