Question : Write a function to test if two binary trees are equal. The trees are equal only if the values are equal and also the structures are equal. Equal trees 89 89 12 100 12 100 2 2 Not equal trees 89 89 2 100 12 100 12 2 First thing which comes to our mind is just write if nd1->val !=nd2->val, trees are not equal. OK. That is correct. But then what? What do we compare next? Value of left child? Or value of right child? Like all other operations of binary tree, this function also needs recursion. After ensuring that nd1->val and nd2->val are equal, we have to call this function on left child and right child. And only if both of these calls return 1, the trees are equal. So here are the steps If nodes of two trees nd1 and nd2 are