Binary Tree Diameter of the Tree

Diameter of tree
We haven’t initalised height in the program earlier than how we have taken height in the program in the diameter function as while working on the code it’s showing me height not declared or if I am wrong kindly correct me .
Link for my program is :

hello @priyanka_20

it is not predefined , u need to write ur own height function

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.