Https://ide.codingblocks.com/s/406813

2 test cases are running this way plz check and tell for which test case my code is failing plz.

Hello @asinghal1_be19 could you please explain your logic?

@asinghal1_be19 you are not even forming the tree in the correct manner.
i think we have to discuss this.
please explain your logic.

i took the input for both trees as a string then as i just need to check for the structure i just checked is the format for forming the tree is same or not as in irrespective of the value given in input as data i just checked both trees are forming tree int the same format or not .plz provide me with the test case for which it is failing so that i can correct it

Hello @asinghal1_be19 no you cant do this in this way:
you have to form the tree and then only you can do this:

atleast provide a test case for which my code failed plz

@asinghal1_be19 shoot all your doubts if you have.
i am here to solve your queries only.
your code is not printing the correct result for sample test case.

plz guide me how can i check weather two trees are structurally same or not

i didnt understiid the input format also

@asinghal1_be19 you can form the tree i.e if there is true value then you will attach the data value to the corresponding side otherwise if it is fase then you will attach null value.
try to go in this way:
in this you can make the build function in which you will give two conditions one for when the string is true and the other for false when the it has no child.
when it has no child you will simple attach null to it but when it has child then you will form the node for the data value and then you will check for the child strings of and then pass them to attach at the left and right following the same criteria mentioned above.
Here for your reference i am attaching the code:https://ide.codingblocks.com/s/397075
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.