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

Class Node

python/Chapter 3/Question3_5/3_5.py:42–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40### NODE AND STACK IMPLEMENTATION ###
41from copy import deepcopy
42class Node(object):
43 def __init__(self, data=None, nextNode=None):
44 self.data = data
45 self.nextNode = nextNode
46
47 def __str__(self):
48 return str(self.data)
49
50
51class Stack(object):

Callers 2

__init__Method · 0.70
pushMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected