标签:
原题地址
二叉树的遍历
代码:
1 int maxDepth(TreeNode *root) { 2 if (!root) 3 return 0; 4 return max(maxDepth(root->left), maxDepth(root->right)) + 1; 5 }
Leetcode#104 Maximum Depth of Binary Tree
原文地址:http://www.cnblogs.com/boring09/p/4267251.html