class Solution{
    public:
    //Function to find the height of a binary tree.
    int depth(Node* temp)
    {
        if(temp==NULL) return 0;
        int lh=depth(temp->left);
        int rh=depth(temp->right);
        return 1+max(lh,rh);
    }
    int height(struct Node* node){
         int ans=depth(node);
         return ans;
        // code here 
    }
};