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

Method _get

AVL.py:155–163  ·  view source on GitHub ↗
(self, key, currentNode)

Source from the content-addressed store, hash-verified

153 return None
154
155 def _get(self, key, currentNode):
156 if not currentNode:
157 return None
158 elif currentNode.key == key:
159 return currentNode
160 elif key < currentNode.key:
161 return self._get(key, currentNode.leftChild)
162 else:
163 return self._get(key, currentNode.rightChild)
164
165 def __getitem__(self, key):
166 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