今天ooxx研究院给大家发一个关于用C++ 递归算法 从小到大输出二叉排序树中所有值不小于x的关键字的源码

void Out(BiTree t, KeyType x, KeyType &a, KeyType &b)
{
if( t )
if( x == t->data.key )
{
Out( t -> lchild, x, a, b );
Out( t -> rchild, x, a, b );
}
else if( x < t->data.key[……]

更多