MCPcopy Create free account
hub / github.com/careercup/ctci / insertBefore

Function insertBefore

python/Chapter 2/Question2_5.py:73–76  ·  view source on GitHub ↗
(node, value)

Source from the content-addressed store, hash-verified

71
72# Helper function to insert node before a node
73def insertBefore(node, value):
74 new_node = Node(value)
75 new_node.next = node
76 return new_node
77
78
79# Helper function to create a reversed linedlist

Callers 1

addListsFwd2HelperFunction · 0.85

Calls 1

NodeClass · 0.50

Tested by

no test coverage detected