MCPcopy 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"""
2The diameter/width of a tree is defined as the number of nodes on the longest path
3between two end nodes.
4"""

Callers

nothing calls this directly

Calls 2

NodeClass · 0.70
diameterMethod · 0.45

Tested by

no test coverage detected