摘要: 设二叉排序树已经以二叉链表得形式存储在内存中,使用递归算法求各节点的平衡因子。 void BF(BiTree &T,int l,int r) //l表示左子树的深度,r表示右子树的深度,初始值均为0 { int b; if(!T->Lchild&&!T->Rchild) b=0; else { if(T->Lchild) {l++;BF(T->Lchild,l,... 阅读全文
posted @ 2006-01-23 15:16 火火 阅读(1434) 评论(1) 推荐(0) 编辑