MCPcopy Index your code
hub / github.com/keon/algorithms / remove_key

Method remove_key

algorithms/data_structures/b_tree.py:151–157  ·  view source on GitHub ↗

Remove a key from the B-tree. Args: key: The key to remove.

(self, key: int)

Source from the content-addressed store, hash-verified

149 current_node = current_node.children[i + 1]
150
151 def remove_key(self, key: int) -> None:
152 """Remove a key from the B-tree.
153
154 Args:
155 key: The key to remove.
156 """
157 self._remove_key(self.root, key)
158
159 def _remove_key(self, node: Node, key: int) -> bool:
160 """Recursively remove a key from the subtree rooted at node.

Callers 2

Calls 1

_remove_keyMethod · 0.95

Tested by 2