Hi this is my code and my two test cases are failing PLease cheack
Two test cases failed
hi… no need to write so much code for this function…
bool areIdentical(node* root1,node* root2){
if(root1==NULL and root2==NULL)
return true;
return (root1 && root2) && areIdentical(root1->left,root2->left) && areIdentical(root1->right,root2->right);
}
only this would work fine...
do u still have any issue???
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.