MCPcopy Index your code
hub / github.com/Jack-Lee-Hiter/AlgorithmsByPython / insertRight

Method insertRight

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

Source from the content-addressed store, hash-verified

13 self.leftChild = t
14
15 def insertRight(self, newNode):
16 if self.rightChild == None:
17 self.rightChild = BinaryTree(newNode)
18 else:
19 t = BinaryTree(newNode)
20 t.rightChild = self.rightChild
21 self.rightChild = t
22
23 def getRightChild(self):
24 return self.rightChild

Callers 1

buildParseTreeFunction · 0.80

Calls 1

BinaryTreeClass · 0.85

Tested by

no test coverage detected