题目:求二叉树高
分析:得到左子树高,得到右子树高,比较一下谁大,+1 返回
int finddeepth(BinaryTreeNode* root)
{
if (root==NULL) {
return 0;
}
int deepleft =finddeepth(root->left);
int deepright=finddeepth(root->right);
return deepleft>deepright?(deepleft+1):(deepright+1);;
}