Pls tell error in this code.. one test case not passing
Hello @Vaibhav277 , In your code you are checking that the two trees should be completely identical and not “Structurally Identical” .
Structurally Identical means they may or maynot have the same value , so you can remoave the root1->data == root2->data check from that statement and your code will work just fine
.
Hope it helps
if your query is resolved please mark it as resolved and rate me accordingly . Thankyou
okay thank you sir…
1 Like