###### 104 Maximum Depth of Binary Tree

/**
* Definition for a binary tree node.
* struct TreeNode {
*     int val;
*     TreeNode *left;
*     TreeNode *right;
*     TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
int maxDepth(TreeNode* root) {
if(root == NULL)
return 0;
int l=maxDepth(root->left),r=maxDepth(root->right);
if(l > r)
return l+1;
else
return r+1;
}

};

#### leetcode 104 Maximum Depth of Binary Tree二叉树求深度

2015-05-13 22:16:12

#### LeetCode 104 -Maximum Depth of Binary Tree ( JAVA )

2016-04-05 18:27:44

#### 【LeetCode-面试算法经典-Java实现】【104-Maximum Depth of Binary Tree（二叉树的最大深度）】

2015-08-08 06:43:32

#### 104. Maximum Depth of Binary Tree [easy] (Python)

2016-05-07 13:21:08

#### Maximum Depth of Binary Tree -- LeetCode

2014-02-22 03:34:51

#### maximum-depth-of-binary-tree(二叉树的最大深度)

2016-09-07 20:55:45

#### Given a binary tree, find its maximum depth.

2014-05-23 14:21:31

#### 【LeetCode】【Python题解】Single Number & Maximum Depth of Binary Tree

2014-07-20 13:18:24

#### 【leetcode c++】104 Maximum Depth of Binary Tree

2015-07-27 14:43:08

#### [LeetCode] 049: Maximum Depth of Binary Tree

2017-09-10 20:49:46

## 不良信息举报

104 Maximum Depth of Binary Tree