int diameter(node* root)
{
if (root == NULL)
return 0;
int h1 = height(root->left);
int h2 = height(root->right);
int op1 = h1 + h2;
int op2 = diameter(root->left);
int op3 = diameter(root->right);
return max(op1, max(op2, op3));
}
how is the time complexity O(N^2) for this algorithm?