Question: Find out if 2 given binary trees are identical (data is same in both trees)

Solution: bool areIdentical(struct node* root1, struct node* root2)
{
if (root1 == NULL && root2 == NULL)
{
return true;
}

/* All five conditions must be checked to handle all cases */
if( root1 != NULL &&
root2 != NULL &&
root1->data == root2->data &&
areIdentical(root1->left, root2->left) &&
areIdentical(root1->right, root2->right)
)
{
return true;
}

return false;
}