Help with approach?

What is the right approach to solve the question?

Hey @goyalvivek
the smaller problem is to find out whether the left subtree and right subtree of the root node for the two trees are structurally similar or not.
If true, return true. Else even if one the condition is false, return false.
There will be two base cases for the given question.
a) If both the trees are empty, return true.
b) If one of the trees remain null and other one does not, then return false.
https://ide.codingblocks.com/s/631871 this is code for the same if you find any difficulty in understanding the approach or any line of code please feel free to ask.
Happy Learing at Coding Blocks.

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.