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

Method replaceNodeData

AVL.py:34–42  ·  view source on GitHub ↗
(self, key, value, lc, rc)

Source from the content-addressed store, hash-verified

32 return self.rightChild and self.leftChild
33
34 def replaceNodeData(self, key, value, lc, rc):
35 self.key = key
36 self.payload = value
37 self.leftChild = lc
38 self.rightChild = rc
39 if self.hasLeftChild():
40 self.leftChild.parent = self
41 if self.hasRightChild():
42 self.rightChild.parent = self
43
44class BinarySearchTree:
45 def __init__(self):

Callers 1

removeMethod · 0.45

Calls 2

hasLeftChildMethod · 0.95
hasRightChildMethod · 0.95

Tested by

no test coverage detected