MCPcopy Create free account
hub / github.com/Jack-Lee-Hiter/AlgorithmsByPython / _get

Method _get

BinarySearchTree.py:90–98  ·  view source on GitHub ↗
(self, key, currentNode)

Source from the content-addressed store, hash-verified

88 return None
89
90 def _get(self, key, currentNode):
91 if not currentNode:
92 return None
93 elif currentNode.key == key:
94 return currentNode
95 elif key < currentNode.key:
96 return self._get(key, currentNode.leftChild)
97 else:
98 return self._get(key, currentNode.rightChild)
99
100 def __getitem__(self, key):
101 return self.get(key)

Callers 3

getMethod · 0.95
__contains__Method · 0.95
deleteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected