#include <math.h>
#include "eee.cpp"
typedef struct BSTNode
{
int data;
struct BSTNode *lchild,*rchild;
}BSTNode, *BSTree;
void InsertBST(BSTree &T,int e)//插入节点
{
//****
BSTNode*S;
if(!T)
{
S=new BSTNode;
S->data=e;
S->lchild=S->rchild=NULL;
T=S;
}
else if(e<T->data)
InsertBST(T->lchild,e);
else if(e>T->data)
InsertBST(T->rchild,e);
}
void DeleteBST(BSTree &T,int key)//删除结点
{
//****
BSTNode *p;
BSTNode *f,*s,*q;
p=T;
f=NULL;
while(p){
if(p->data==key) break;
f=p;
if(p->data>key) p=p->lchild;
els