int GetTreeDeep(BiTree T)
{
if(T==NULL)
return 0;
else
{
int left=GetTreeDeep(T->lchild)+1;
int right=GetTreeDeep(T->rchild)+1;
}
return (left>right)?left:right;
}
求二叉树的高度
最新推荐文章于 2021-12-10 16:48:39 发布