查找技术

class BiSortTree //二叉排序树类声明
{
public:
BiSortTree (intal l, int n);~ BiSortTree( );
void InsertBST (BiNode * root, BiNode *s);
void DeleteBST (BiNode *p, BiNode *f) ;
BiNode *SearchBST (BíNode *root, int k) ;
private:
BiNode * root;
}
BiSortTree:BiSorTree(int r[], int n){//二叉树排序的构造算法
{
for(i=0;i<n; int n)
{s=new BiNode;
s->datarJil;
s>lchild=s->rehild=NULL;
insertBST(root,s);}
}
void BiSortTree:: InsertBST(BiNode *root, BiNode *s) //二叉树的插入算法
if(rootNULL)
root=s;
else if(s->datadata)
lnsertBST(root->ichild,s
else InsertBST(root->rchild, s);
查找技术查找技术查找技术查找技术查找技术查找技术查找技术查找技术查找技术