Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BeeBombshell/Python-DSA
/ add
Method
add
Tree Data Structure/binarytree.py:16–20 ·
view source on GitHub ↗
(self, val)
Source
from the content-addressed store, hash-verified
14
15
#to add a new node in tree
16
def
add(self, val):
17
if
self.root is None:
18
self.root = Node(val)
19
else
:
20
self._add(val, self.root)
21
22
# to add elemnts in tree
23
def
_add(self, val, node):
Callers
3
gen
Function · 0.80
dfs
Function · 0.80
binarytree.py
File · 0.80
Calls
2
_add
Method · 0.95
Node
Class · 0.70
Tested by
no test coverage detected