问题描述:
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 nev...
分类:
其他好文 时间:
2014-10-27 21:25:12
阅读次数:
193
问题描述:
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,...
分类:
其他好文 时间:
2014-10-27 21:21:00
阅读次数:
190
问题描述:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
But the ...
分类:
其他好文 时间:
2014-10-27 21:19:41
阅读次数:
231
问题描述:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 ...
分类:
其他好文 时间:
2014-10-27 21:19:34
阅读次数:
236
问题描述:
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
...
分类:
其他好文 时间:
2014-10-27 21:17:54
阅读次数:
165
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:
其他好文 时间:
2014-10-27 20:59:08
阅读次数:
164
一:介绍puppet管理nginx主机,将nginx主机加入到puppet中,实现自动安装、配置、和启动服务二:nginx模块结构[root@mastermodules]#tree/etc/puppet/modules/nginx//etc/puppet/modules/nginx/├──files├──manifests│├──conf.pp│├──init.pp│└──install.pp└..
分类:
其他好文 时间:
2014-10-27 19:46:33
阅读次数:
237
【题意简述】:就是定义了另外一种数制的表示形式,并给了你这种数制表示形式与十进制的转换关系,现在给你一个这样的数制,让你把它换成2进制输出。
【分析】:其中 base[k] = 2^(k+1)-1 = 2(2^k-1)+1 = 2base[k-1]+1
// 200K 0Ms
#include
#include
using namespace std;
int main()
{
...
分类:
其他好文 时间:
2014-10-27 19:33:42
阅读次数:
163
Dojo Tree组件是一个强大的展示层级数据的工具。该教程将展示如何连接tree与store来快速有效的展示层级数据。
分类:
其他好文 时间:
2014-10-27 17:27:08
阅读次数:
242
先说下我的代码风格(很丑,勿喷) maxn表示最大空间的四倍 tree数组表示求和的线段树 delta表示增减的增量标记 sign表示覆盖的标记 delta,sign实际上都是lazy标志 pushdown表示标记下传 pushup表示标记上传(即求和,区间最值) update表示...
分类:
其他好文 时间:
2014-10-27 17:23:11
阅读次数:
189