Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Jack-Lee-Hiter/AlgorithmsByPython
/ ListNode
Class
ListNode
leetcode/19. Remove Nth Node From End of List.py:7–10 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
5
After removing the second node
from
the end, the linked list becomes 1->2->3->5.
6
''
&
#x27;
7
class
ListNode(object):
8
def
__init__(self, x):
9
self.val = x
10
self.next = None
11
12
class
Solution(object):
13
def
removeNthFromEnd(self, head, n):
Callers
1
removeNthFromEnd
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected