在结点数确定的二叉排序树上进行查找的平均查找长度与二叉树的形态有关 最好的情况是二叉排序树
已帮助 人
回答
共1条回复-
bitree *bstsearch1(bitree *t, int key) {
bitree *p=t;
while(p!=0) if (p->key==key) return(p);else if (p->key>key)p=p->lchild; else p=p->rchild; return(0); }

