update the answer , because diameter of a tree is nothing but maximum value of ( left_height + right_height + 1 ) for each node
ans = max ( ans , 1 + left_height + right_height ) ; return 1 + max ( left_height , right_height ) ; }