1.基础
struct node{
int data;
node* lchild;
node* rchild;
};
node* root=NULL;
node* newnode(int v){
node* s=new node;
s.data=v;
s.lchild=s.rchild=NULL;
return s;
}
void search(node* s,int x,int nx){
if(s==NULL) return;
if(s.data==x) s.data=nx;
search(s.lchild,x,nx);
search(s.rchild,x,nx);
}
void insert(node* &root,int x){
if(root==NULL){
root=newnode(x);
return;
}
}
node* create(int martix[],int n){
node* roow=NULL;
for(int i=0;i<n;i++){
insert(root,martix[i]);
}
return root;
}