/*int count(node *p)
{
if(p==NULL)
return 0;
else if(count(p->lchild)>=count(p->rchild))
return count(p->lchild)+1;
else count(p->rchild)+1;
}*///错误版树高计算程序 问:到底哪错了???个人感觉是递归上出问题了。。。


很明显嘛,错在count(p->lchild)>=count(p->rchild) 根本就没你在求左子树的时候还得用同层次右子树的信息,当然不对了。。只能用下一层的信息。。