int height(BiTree T)
{
int l,r,h =0;
if(T){
l=height(T->left);
r=height(T->right);
if(l>r){
h=l+1;
}else {
h=r+1;
}
}
return h;
}
求二叉树高度
最新推荐文章于 2023-08-28 20:09:05 发布