MCPcopy
hub / github.com/Jack-Lee-Hiter/AlgorithmsByPython / insertLeft

Method insertLeft

BinaryTree.py:7–13  ·  view source on GitHub ↗
(self, newNode)

Source from the content-addressed store, hash-verified

5 self.rightChild = None
6
7 def insertLeft(self, newNode):
8 if self.leftChild == None:
9 self.leftChild = BinaryTree(newNode)
10 else:
11 t = BinaryTree(newNode)
12 t.leftChild = self.leftChild
13 self.leftChild = t
14
15 def insertRight(self, newNode):
16 if self.rightChild == None:

Callers 1

buildParseTreeFunction · 0.80

Calls 1

BinaryTreeClass · 0.85

Tested by

no test coverage detected