this is showing compilation errors.Also I am not able to understand the way of taking input i.e. the reason of NULL being written in the sample input and then the way is also not clear.Please help.
Compilation error in identical binary tree
hello @srshubhi398
ur build tree is not correct.

first read root node.
then check whether left subtree exist or not by reading a string .
if it is true that means left subtree exist ,so build left tree recursively
otherwise assign NULL to left of current node.
again read one more string to check whether right subtree exist or not.
if it exist(string is true) then build it recursively
otherwise
assign NULL to right of current node
and at the end return current node
Thankyou so much.I understood.
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.