why the data of 1st and 2nd root not compatred in this solution rather the pointer node root is compared ???
Structurally identical (why root->data not compared)?
@Abhishek-Ghosh-2306223462800568 root->data is not compared because according to question we only need to check the similarity of the structure and not the data.
Even if one tree had char data type and other tree had integer data type they could still be similar in structure, but with different data, off-course. Data doesn’t have to be same for 2 trees for them to have a similar structure.
Hope this helps.
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.