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

Method put

AVL.py:58–63  ·  view source on GitHub ↗
(self, key, val)

Source from the content-addressed store, hash-verified

56 return self.root.__iter__()
57
58 def put(self, key, val):
59 if self.root:
60 self._put(key, val, self.root)
61 else:
62 self.root = TreeNode(key, val)
63 self.size = self.size + 1
64
65 def _put(self, key, val, currentNode):
66 if key < currentNode.key:

Callers 1

__setitem__Method · 0.95

Calls 2

_putMethod · 0.95
TreeNodeClass · 0.70

Tested by

no test coverage detected