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
Update max diameter if current diameter is larger
Recurse for left child
Recurse for right child
Return height of current node = max(left height, right height) + 1
End when all nodes processed
The diameter is found by recursively computing heights of left and right subtrees at each node, updating the maximum diameter found as the sum of these heights.
