Check if binary trees are STRUCTURALLY IDENTICAL

only 2 testcases are true out of 4
code: https://ide.codingblocks.com/s/97282
question: https://hack.codingblocks.com/contests/c/916/474

Hi Dhruvika
Your code requires two changes. In the check( ) , the third if condition should be the first one to be checked. Otherwise it will never get executed because of the first if condition.
Also in your main ( ) , you should check for p == 1 or p == true …not 0. Otherwise you would get the opposite answers.

Here’s your updated code - https://ide.codingblocks.com/s/97285

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.