文章
1
粉丝
0
获赞
7
访问
178
#include<bits/stdc++.h>
using namespace std;
typedef struct node
{
int data;
struct node *lchild, *rchild;
}*Bitree;
void Insert(Bitree &T, int x)
{
if(T==NULL)
{
T = new node;
T->data = x;
T->lchild = NULL;
T->rchild = NULL;
}
if(T->data == x) return;
else if(x < T->data) Insert(T->lchild, x);
else Insert(T->rchild, x);
}
bool Judge(Bitree T1, Bitree T2)
{
if(!T1 && !T2) return true;
if((!T1 && T2 )||(T1 && !T2)||(T1->data != T2->data))
return false;
return Judge(T1->lchild, T2->lchild)&...
登录后发布评论
暂无评论,来抢沙发