int TreeDepth(struct TreeNode* pRoot ) { if(pRoot==NULL){ return 0; } int depth; int left_depth=TreeDepth(pRoot->left); int right_depth=TreeDepth(pRoot->right); depth=left_depth>right_depth?left_depth+1:right_depth+1; return depth; }