Structurally identical binary tree

getting one wrong ans on submission

https://ide.codingblocks.com/s/45255

https://hack.codingblocks.com/contests/c/511/474

Hey Jai, there is a small correction in your check function… remove 2nd if else condition from check function. You can refer the code snippet given below… i have just corrected the error in your code.

bool check(node*root1,node*root2){

if(root1==NULL and root2==NULL){
    return true;
}

else if(root1==NULL or root2==NULL){
    return false;
}

    return check(root1->right, root2->right) &&  check(root1->left, root2->left);

}