Leetcode(104)之二叉树的最大深度
2020-01-04 18:11
1331 查看
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
题目描述:
解题思路:
代码:
public int MaxDepth(TreeNode root) { if (root == null) return 0; return Mathf.Max(MaxDepth(root.left) + 1, MaxDepth(root.right) + 1); }
相关文章推荐
- LeetCode 104--二叉树的最大深度
- LeetCode写题历程——104.二叉树的最大深度
- Leetcode 104 python 二叉树的最大深度
- LeetCode:104_Maximum Depth of Binary Tree | 二叉树的最大深度 | Easy
- leetcode之二叉树类之二叉树深度系列-----104/111/110/108/109 二叉树最大/最小深度/AVL树的判断和由有序序列生成(牵扯分治相关,OJ105/106)
- LeetCode:104_Maximum Depth of Binary Tree | 二叉树的最大深度 | Easy
- LeetCode-104.二叉树的最大深度(相关话题:递归)
- LeetCode 104 Maximum Depth of Binary Tree(二叉树的最大深度)
- LeetCode:104_Maximum Depth of Binary Tree | 二叉树的最大深度 | 深度优先与广度优先深入理解
- LeetCode(104):二叉树的最大深度
- leetcode104_二叉树的最大深度
- LeetCode104--二叉树最大深度
- 【LeetCode-面试算法经典-Java实现】【104-Maximum Depth of Binary Tree(二叉树的最大深度)】
- LeetCode 104 二叉树的最大深度
- [LeetCode] 104 二叉树最大深度
- 二叉树的最大深度(leetcode-104)
- [LeetCode-104] Maximum Depth of Binary Tree(二叉树最大深度)
- Leetcode 104 Maximum Depth of Binary Tree 二叉树的最大深度
- leetcode 104求二叉树的最大深度
- 【LeetCode-面试算法经典-Java实现】【104-Maximum Depth of Binary Tree(二叉树的最大深度)】