【LeetCode】Balanced Binary Tree 解题报告
来源:互联网 发布:全球鹰与翔龙数据对比 编辑:程序博客网 时间:2024/05/18 00:02
Balanced Binary Tree
[LeetCode]
https://leetcode.com/submissions/detail/40087813/
Total Accepted: 72203 Total Submissions: 225370 Difficulty: Easy
Question
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
https://leetcode.com/submissions/detail/40087813/
Examples
–
Ways
运用递归,递归当前和 左子树和右子树的深度,当所有的左右子树的深度相差不超过1的时候,就是平衡二叉树。
Solution
托管在我的GitHub上:
https://github.com/fuxuemingzhu/BalancedTree
Captures
测试结果截图:
Reference
http://www.cnblogs.com/Antech/p/3705928.html
Date
2015/9/16 16:43:15
0 0
- [LeetCode]Balanced Binary Tree,解题报告
- 【LeetCode】Balanced Binary Tree 解题报告
- 【LeetCode】Balanced Binary Tree 解题报告
- LeetCode(110) Balanced Binary Tree解题报告
- [leetcode] 110. Balanced Binary Tree 解题报告
- [Leetcode] 110. Balanced Binary Tree 解题报告
- 【LeetCode】Balanced Binary Tree 算法优化 解题报告
- Leetcode 110. Balanced Binary Tree 平衡二叉树 解题报告
- LeetCode解题报告 110. Balanced Binary Tree [easy]
- [leetcode]110. Balanced Binary Tree@Java解题报告
- [LeetCode]Binary Tree Postorder Traversal,解题报告
- [LeetCode]Validate Binary Search Tree, 解题报告
- LeetCode 解题报告 Binary Tree Postorder Traversal
- LeetCode 解题报告 Binary Tree Preorder Traversal
- 【LeetCode】Validate Binary Search Tree 解题报告
- [LeetCode]Binary Search Tree Iterator,解题报告
- 【LeetCode】Recover Binary Search Tree 解题报告
- LeetCode-Invert Binary Tree-解题报告
- TCP报文段首部详解
- Android快速开发常用工具类
- iOS 打包工具生成
- LeetCode|Pascal's Triangle II-java
- Java从包中读取所有的class文件
- 【LeetCode】Balanced Binary Tree 解题报告
- 「回溯法」Palindrome Partitioning
- 【Android应用开发】分享一个录制 Android 屏幕 gif 格式的小技巧
- BellmanFord判环算法
- ruby:$LOAD_PATH.unshift
- sizeof() 类大小,空类大小
- Xml解析
- MAC OS绕过开机密码
- solr HMMChineseTokenizer 中文解词