The gray code is a binary numeral system where two successive valuesdiffer in only one bit.
Given a non-negative integer n representing the totalnumber of bits in the code, print the sequence of gray...
分类:
其他好文 时间:
2015-02-11 09:24:25
阅读次数:
233
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recursive soluti...
分类:
其他好文 时间:
2015-02-11 09:21:46
阅读次数:
137
The problem:Given node P and node Q in a binary tree T.Find out the lowest common ancestor of the two nodes.Analysis:The answer of this problem could ...
分类:
其他好文 时间:
2015-02-11 01:46:29
阅读次数:
114
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binarytree in which the depth of the two subtrees of every nodenever differ by...
分类:
其他好文 时间:
2015-02-10 23:18:11
阅读次数:
372
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 le...
分类:
其他好文 时间:
2015-02-10 23:02:36
阅读次数:
218
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...
分类:
其他好文 时间:
2015-02-10 22:56:46
阅读次数:
204
题目大意:给一棵完整的树:给出每一层的节点号(xi,同一层的节点共用一个号,从第一层到第n层不一定是从x1到xn,是打乱的)给出所有叶子节点的值(如n=3,叶子节点有8个)给出路径v1v2v3...Vn:0走左子树,1走右子树,但是路径是严格分配给x1x2x3...xn的,即如果第一层节点即根..
分类:
其他好文 时间:
2015-02-10 17:03:12
阅读次数:
170
http://www.openssl.org 上只有OpenSSL的原代码下载,为了方便Windows用户使用OpenSSL,我们特地为您准备了OpenSSL 0.9.8.a for win32的可执行版本(binary版) 下载地址是: http://www.myssl.cn/download/O...
分类:
其他好文 时间:
2015-02-10 11:12:07
阅读次数:
212
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 1
\ ...
分类:
其他好文 时间:
2015-02-10 01:57:18
阅读次数:
121
Skew Binary
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu
Submit Status Practice UVA
575
Description
When a number is expressed in decimal, the k-th digit ...
分类:
其他好文 时间:
2015-02-09 23:10:07
阅读次数:
222