Structurally Identical(Binary Tree)---Wanted help regarding my approach to question

I am passing 3 out of 4 test cases .I am not able to identify the edge case which I am missing so wanted help regarding it.
Link to my code is-https://ide.codingblocks.com/s/54597
Please tell what is wrong in my approach /code.
Thanks in advance sir/ma’am.

Hey Nikhil, read the problem carefully, you are supposed to check if two binary trees are Structurally Identical or not. So check this you just have to check their structure not the data present in the nodes.

For eg.
input:
10 true 20 true 40 false false true 50 false false true 30 true 60 false false true 73 false false
10 true 21 true 40 false false true 50 false false true 30 true 60 false false true 73 false false

your code’s output:
false

but the expected output is:
true

because both the trees have same structure and therefore they are Structurally Identical .