Remove Nth Node From End of List Solutions in PythonNumber 19Difficulty MediumAcceptance 35.2%Link LeetCodeOther languages C++, Java, GoSolutionsPython solution by haoel/leetcodedef removeNthFromEnd(self, head, n): slow = fast = head for i in range(n): fast = fast.next if not fast: return head.next while fast.next: fast = fast.next slow = slow.next slow.next = slow.next.next return headdef removeNthFromEnd(self, head, n): slow = fast = head for i in range(n): fast = fast.next if not fast: return head.next while fast.next: fast = fast.next slow = slow.next slow.next = slow.next.next return head