104:Maximum Depth of Binary Tree【树】【DFS】
来源:互联网 发布:烟台网络党校下载 编辑:程序博客网 时间:2024/06/06 04:27
题目链接:click~
/*题意:求二叉树的深度*/class Solution {public: int maxDepth(TreeNode *root) { if(root == NULL) return 0; return max(maxDepth(root->left), maxDepth(root->right)) + 1; }};
0 0
- 104:Maximum Depth of Binary Tree【树】【DFS】
- DFS:104. Maximum Depth of Binary Tree
- LeetCode 104Maximum Depth of Binary Tree(DFS?)
- LeetCode 104 Maximum Depth of Binary Tree(DFS)
- Leetcode 104 Maximum Depth of Binary Tree
- LeetCode(104)Maximum Depth of Binary Tree
- LeetCode 104 Maximum Depth of Binary Tree
- LeetCode: Maximum Depth of Binary Tree [104]
- Leetcode(104)Maximum Depth of Binary Tree
- [leetcode 104] Maximum Depth of Binary Tree
- LeetCode 104 Maximum Depth of Binary Tree
- leetCode #104 Maximum Depth of Binary Tree
- LeetCode 104: Maximum Depth of Binary Tree
- 104Maximum Depth of Binary Tree
- LeetCode 104 Maximum Depth of Binary Tree
- leetcode || 104、Maximum Depth of Binary Tree
- LeetCode 104: Maximum Depth of Binary Tree
- leetcode[104]:Maximum Depth of Binary Tree
- [JAVA] 枚举型使用方法
- ios swift 学习
- 使用Python urllib2下载CSDN博客列表到本地
- 第二章
- iOS NSString的常用用法
- 104:Maximum Depth of Binary Tree【树】【DFS】
- SQLite数据库简介
- JS中变量名作为if条件的真/假
- C++中定义比较函数的三种方法
- Rainy season best wbp brown film faced plywood
- C# 中参数验证方式的演变
- 操姓男子因孩子取名问题闹离婚
- 常见排序算法C++实现(冒泡,直接插入,希尔,堆,归并,简单选择,快排)
- Android Support Library Features(二)