Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/HuberTRoy/leetCode
/ __init__
Method
__init__
Tree/BinarySearchTree.py:29–34 ·
view source on GitHub ↗
(self, root)
Source
from the content-addressed store, hash-verified
27
""
"
28
29
def
__init__(self, root):
30
if
isinstance(root, TreeNode):
31
print(1)
32
self.root = root
33
else
:
34
self.root = TreeNode(root)
35
36
def
add(self, value):
37
# 从顶点开始遍历,找寻其合适的位置。
Callers
nothing calls this directly
Calls
1
TreeNode
Class · 0.85
Tested by
no test coverage detected