Clean c solution
c\nstruct ListNode* removeNthFromEnd(struct ListNode* head, int n){\n    struct ListNode *p=head, *q=head;\n\t// delay by n nodes.\n    for(int i=0; i<n; i++) {
```c\nstruct ListNode* removeNthFromEnd(struct ListNode* head, int n){\n    struct ListNode *p=head, *q=head;\n\t// delay by n nodes.\n    for(int i=0; i<n; i++) {\n        p = p->next;\n    }\n    if(!p) {\n        //remove head\n        return head->next;\n    }\n\t// pass through\n    while(p->next) {\n        p = p->next;\n        q = q->next;\n    }\n    q->next = q->next->next;\n    return head;\n}\n```\n\nAlthough there are two loop, but it is still a one pass solution.
[]