【LeetCode】Maximum Depth of Binary Tree 解题报告
2015-09-16 10:49
447 查看
Maximum Depth of Binary Tree
[LeetCode]https://leetcode.com/problems/maximum-depth-of-binary-tree/
Total Accepted: 85334 Total Submissions: 188240 Difficulty: Easy
Question
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
https://leetcode.com/problems/maximum-depth-of-binary-tree/
Examples
–Ways
运用递归,递归左子树和右子树的深度,判断哪个子树的深度更大,计入总的树的深度。Solution
托管在我的GitHub上:https://github.com/fuxuemingzhu/DepthOfTree
Captures
测试结果截图:Reference
算法之二叉树各种遍历轻松搞定面试中的二叉树题目
Date
2015/9/16 10:42:06相关文章推荐
- perror打造linux C 编程开发中的错误定位与捕捉函数
- 使用方便git命令检查记录的版本号
- oracle中视图v$sql的用途
- JAVA里的String、Timestamp、Date相互转换(转)
- oracle安全管理
- public class 和 class的区别
- MPTCP 介绍
- android混淆和反编译
- android混淆和反编译
- android布局中更换控件顺序后无法正常运行的解决办法
- scala 安装和入门
- remastersys用法
- Jmeter压力测试工具
- chrome textension Content Security Policy
- android混淆和反编译
- Android(java)学习笔记258:JNI之hello.c(c代码功能实现)指针语法解析
- MyEclipse 8.5破解
- NSArray和NSMutableArray的创建及常用方法
- JAVA 常用API Date 类
- 仿QQ侧滑