编辑代码

#include <stdio.h>

int judgebitree(bitree* bt1, bitree* bt2)  //判断两个二叉树是否相同
{
    if(bt1 == 0 && bt2 ==0)  //两棵树对应位置都为空返回1
        return 1;
    else if(bt1 == 0 || bt2 == 0 || bt1->data != bt2->data)
    //两棵树的当前节点只有一个为空或者两棵树的当前节点的值不同
    return 0;
    else
        return judgebitree(bt1->lchild, bt2->lchild) * judgebitree(bt1->rchild, bt2->rchild);
}