I tried to find the method to establish the binary tree. Almost all existing methods like the following code:
BiTree CreateBiTree(){
char ch;
BiTree T;
scanf("%c",&ch);
if(ch=='#')T=NULL;
else{
T = (BiTree)malloc(sizeof(BiTNode));
T->data = ch;
T->lchild = CreateBiTree();
T->rchild = CreateBiTree();
}
return T;
}
such method likes PreOrderTraverse, Is there any other method to establish the binary tree?