MCPcopy Create free account
hub / github.com/ccagml/leetcode-extension / parseListNode

Function parseListNode

resources/debug/entry/python3/entry.py:105–121  ·  view source on GitHub ↗
(param)

Source from the content-addressed store, hash-verified

103
104
105def parseListNode(param):
106 if (not isList(param)):
107 onParameterError()
108
109 head = None
110 tail = None
111
112 for i in param:
113 node = ListNode(i)
114 if (head == None):
115 tail = node
116 head = node
117 else:
118 tail.next = node
119 tail = node
120
121 return head
122
123
124def parseListNodeArray(param):

Callers 2

parseListNodeArrayFunction · 0.70
parseParameterFunction · 0.70

Calls 3

isListFunction · 0.85
onParameterErrorFunction · 0.70
ListNodeClass · 0.70

Tested by

no test coverage detected