Structurally Identical

codeLink:https ://ide.codingblocks.com/s/182916
my program is failing one test case please tell why it is failing alongwith an correct it.

In this question you just have to check if the two trees are structurally identical or not, which means that you don’t have to compare the data values. You just have to see if the trees have the same shape.
In line 42, it should be if(root1 == NULL && root2 != NULL)
And please use different variables for bool in lines 46 and 47 as left and right are already used as nodes.
Try this and tell me if you get all the test cases right.

@Divya_321 Please mark your doubt as resolved if you are satisfied.

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.

@keshavgupta0103 I have done the changes specified by u now it’s getting a run time error again one test case is failing which was failing earlier