text: Return max of following three 1 ) Diameter of left subtree 2 ) Diameter of right subtree 3 ) Height of left subtree + height of right subtree + 1
code: return max ( lheight + rheight + 1 , max ( ldiameter , rdiameter ) ) ; }