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

Method setLeft

python/Chapter 4/Question4_9/BinaryTreeNode.py:9–13  ·  view source on GitHub ↗
(self, leftvalue)

Source from the content-addressed store, hash-verified

7 self.parent = None
8
9 def setLeft(self, leftvalue):
10 leftnode = BinaryTreeNode(leftvalue)
11 self.left = leftnode
12 if leftnode != None:
13 leftnode.parent = self
14
15 def setRight(self, rightvalue):
16 rightnode = BinaryTreeNode(rightvalue)

Callers 1

mainFunction · 0.95

Calls 1

BinaryTreeNodeClass · 0.70

Tested by

no test coverage detected