求二叉树深度(递归方式)
int FindTreeDeep(BinTree BT){
int deep=0;
if(BT!=null){
int left=FindTreeDeep(BT.left);
int right=FindTreeDeep(BT.right);
deep=left>right?left+1:right+1;
}
return deep;
}
int FindTreeDeep(BinTree BT){
int deep=0;
if(BT!=null){
int left=FindTreeDeep(BT.left);
int right=FindTreeDeep(BT.right);
deep=left>right?left+1:right+1;
}
return deep;
}