typedef struct BiNode {
int data;
struct BiNode *lchild, *rchild;
} *BiTree;
插入
void Insert(int key,BiTree &root) {
if (root == NULL) {
root = (BiNode*)malloc(sizeof(BiNode));
root->lchild = root->rchild = NULL;
root->data = key;
return;
}
if (root->data >= key)
Insert(key, root->lchild);
else Insert(key, root->rchild);
}