Tree: Depth-First Search - Diameter of Binary Tree
In the naive recursive approach to find the diameter of a binary tree, the height of each subtree is recalculated multiple times. What is the overall time complexity of this approach in terms of
n, the number of nodes?