Structurally identical(binary tree)

https://ide.geeksforgeeks.org/R9vR997gDJ
failing some test cases

Hello @anitagupta1411 please wait i am checking your code.

Hello @anitagupta1411 first of all you are not forming your tree in the correct way. i have rectified that.
and then the conditions which you were checking for strucutrally identical of the tree was somewhat wrong.
i have corrected your code and it is passing every case now.
https://ide.geeksforgeeks.org/7uEH6QpdYo
if you have any doubt you can ask here:
Happy Learning!!

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.