MCPcopy Create free account
hub / github.com/HarshCasper/NeoAlgo / Diameter

Function Diameter

Python/ds/DiameterOfBinaryTree.py:62–87  ·  view source on GitHub ↗

Summary Line: This function helps us to calculate the diameter of our tree. Diameter is the number of nodes between the two farthest nodes in our tree. Args: root- root of our inputted tree Returns- h- height of the tree d- diameter of the tree Intuition-

(root)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected