problem:
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 ev...
分类:
其他好文 时间:
2015-04-23 15:47:04
阅读次数:
166
problem:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
Hide Tags
Tree Depth-first
Search
题意:将一个递增的序列 转换成一棵 平衡查找二叉树
...
分类:
其他好文 时间:
2015-04-23 10:59:34
阅读次数:
201
problem:
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
Hide Tags
Depth-first Search Linked
List
题意:给定一个递增的单链表,将其转...
分类:
其他好文 时间:
2015-04-23 10:58:24
阅读次数:
165
题目链接:Balanced Binary Tree
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 ...
分类:
其他好文 时间:
2015-04-23 10:58:02
阅读次数:
153
problem:
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
Hide Tags
Tree Array Depth-first...
分类:
其他好文 时间:
2015-04-23 09:35:14
阅读次数:
157
求二叉树深度。【思路】很简单,二叉树经典。用递归求左树右树的深度,较大值加1即可。【other code】int maxDepth(TreeNode *root) { if(root==NULL) return 0; //if(maxDepth(ro...
分类:
其他好文 时间:
2015-04-22 23:53:08
阅读次数:
165
B Tree's Max Depth:平衡多路查找树的最大高度证明
分类:
其他好文 时间:
2015-04-22 23:37:58
阅读次数:
97
1. 查看文件夹下各个文件及目录的大小
批注:查看当前文件夹下,深度为2的所有文件及目录的占用空间。
du -h --max-depth=22. 设置计划任务
a) 打开计划任务
crontab -eb) 编辑计划任务
批注:可以添加计划任务,或者对已有的计划任务在行首加“#”注释(当然直接删除也行),如以下示例:
*/2 * * * * /root/bin/unison
#* * *...
分类:
系统相关 时间:
2015-04-22 18:26:50
阅读次数:
207
NGUI - UIRoot - Camera1.新建Layer层 - backgroundImg2.设置UIRoot层次为backgroundImg3.Dept : 设置与Main Camera一样,或者小于Main CameraMain Camera1. Clear Flags : Depth o...
分类:
其他好文 时间:
2015-04-22 13:46:41
阅读次数:
120
problem:
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
Hide Tags
Tree Array Depth-first
...
分类:
其他好文 时间:
2015-04-22 11:49:15
阅读次数:
122