844真题
typedef struct BiTNode
{
ElemType data;
struct BiTNode *lchild,*rchild;
}BiTNode,*BiTree;
int Depth(BiTree T)
{
if(T==NULL)
return 0;
else
{
int ldepth=Depth(T->lchild);
int rdepth=Depth(T->rchild);
if(ldepth>rdepth)
return ldepth+1;
else
return rdepth+1;
}
}