Concept Flow - Diameter of Binary Tree
Start at root node
Calculate left subtree height
Calculate right subtree height
Calculate diameter through current node = left height + right height
Calculate diameter in left subtree
Calculate diameter in right subtree
Compare diameters: max of (through current, left subtree, right subtree)
Return max diameter
Repeat for all nodes recursively
The diameter is found by checking each node's left and right subtree heights, summing them, and comparing with diameters of subtrees recursively.
