Simple Python Solution -- One pass
# Definition for singly-linked list.\n    # class ListNode(object):\n    #     def __init__(self, x):\n    #         self.val = x\n    #         self.next = Non
    # Definition for singly-linked list.\n    # class ListNode(object):\n    #     def __init__(self, x):\n    #         self.val = x\n    #         self.next = None\n    \n    class Solution(object):\n        def removeNthFromEnd(self, head, n):\n            """\n            :type head: ListNode\n            :type n: int\n            :rtype: ListNode\n            """\n            runner = head\n            slow = head\n            for i in xrange(n):\n                runner = runner.next\n            if runner is None:       # case where n is the length of the list -- remove first node\n                head = head.next\n                return head\n            while runner.next != None:\n                runner = runner.next\n                slow = slow.next\n            slow.next = slow.next.next\n            return head
['Python']