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

Method get

BinarySearchTree.py:80–88  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

78 self.put(k, v)
79
80 def get(self, key):
81 if self.root:
82 res = self._get(key, self.root)
83 if res:
84 return res.payload
85 else:
86 return None
87 else:
88 return None
89
90 def _get(self, key, currentNode):
91 if not currentNode:

Callers 1

__getitem__Method · 0.95

Calls 1

_getMethod · 0.95

Tested by

no test coverage detected