My Java Solution
public ListNode removeNthFromEnd(ListNode head, int n) {\n        ListNode voidHead = new ListNode(-1);\n        voidHead.next = head;\n        ListNode p1 = vo
    public ListNode removeNthFromEnd(ListNode head, int n) {\n        ListNode voidHead = new ListNode(-1);\n        voidHead.next = head;\n        ListNode p1 = voidHead;\n        ListNode p2 = voidHead;\n        while (p1.next!=null){\n            p1=p1.next;\n            if (n--<=0)p2=p2.next;\n        }\n        if (p2.next!=null) p2.next=p2.next.next;\n        return voidHead.next;\n    }
[]