int compareTree(struct node* firstTree, struct node* SecTree){
if (firstTree==NULL && secTree==NULL) return(true); else if (firstTree!=NULL && secTree!=NULL) {
return(firstTree->data == secTree->data && compareTree(firstTree->left, secTree->left) && compareTree(firstTree->right, secTree->right));
}
else return(false);
}
No comments:
Post a Comment