Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ diameter_of_binary_tree.py
File
diameter_of_binary_tree.py
data_structures/binary_tree/diameter_of_binary_tree.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
""
"
2
The diameter/width of a tree is defined
as
the number of nodes on the longest path
3
between two end nodes.
4
""
"
Callers
nothing calls this directly
Calls
2
Node
Class · 0.70
diameter
Method · 0.45
Tested by
no test coverage detected