Javascript Solution
var removeNthFromEnd = function(head, n) {\n        var nullHead = new ListNode(null);\n        nullHead.next = head;\n        var p1 = nullHead;\n        var p
    var removeNthFromEnd = function(head, n) {\n        var nullHead = new ListNode(null);\n        nullHead.next = head;\n        var p1 = nullHead;\n        var p2 = nullHead;\n        \n        for(var i = 0; i < n + 1; i++)\n            p1 = p1.next;\n        while(p1 !== null){\n            p2 = p2.next;\n            p1 = p1.next;\n        }\n        p2.next = p2.next.next;\n        return nullHead.next;\n    };
['JavaScript']