Structurally Identical Tree

why my test case is failing ??

ur code always displays true for all inputs

But has per question data may or may not be same

pass the flag variable by reference of make it static
or make return type static


I have passed by reference but still gets same output