Leetcode#104 Maximum Depth of Binary Tree

原题地址

二叉树的遍历

代码:

1 int maxDepth(TreeNode *root) {
2         if (!root)
3             return 0;
4         return max(maxDepth(root->left), maxDepth(root->right)) + 1;
5 }
原文地址:https://www.cnblogs.com/boring09/p/4267251.html