[函数5] int DeleteNode(Bitree *r,int e){ Bitree p=* r,pp,s,c; while( (1) ){/ * 从树根结点出发查找键值为e的结点 * / pp=p; if(e<p->data) p=p->Lchild; else p=p->Rchild } if(! p)return-1;/ * 查找失败 * / if(p->Lchild && p->Rchild){/ * 处理情况③ * / s= (2) ;pp=p; while( (3) ){pp=s;s=s->Rchild;} p->dara=s->data;P=s; } / * 处理情况①、② * / if( (4) )c=p->Lchild; else c=p->Rchild if(p==*r) *r=c; else if( (5) )pp->Lchild=c; else pp->Rchild=c; free(p); return 0; }