#define MAX 32 void IntToBinary(char binary[], int x); // x转换为二进制 void IntToBinary2(char binary[], int x); // 不同的思路可以有多种方法 void TrueForm(char binary[....
分类:
其他好文 时间:
2014-08-27 12:20:27
阅读次数:
180
LeetCode: Path SumGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equal...
分类:
其他好文 时间:
2014-08-27 00:07:27
阅读次数:
298
LeetCode: Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 ...
分类:
其他好文 时间:
2014-08-26 22:57:46
阅读次数:
220
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...
分类:
其他好文 时间:
2014-08-26 19:11:06
阅读次数:
193
http://acm.timus.ru/problem.aspx?space=1&num=1081
有一个二进制序列,定义为不能有两个连续的1出现,才是合法的。给出序列的长度n,求合法的二进制序列中按字典序排序后第k个序列是什么。
设dp[i][0]和dp[i][1]分别表示第i位上是0和1的个数。
那么dp[i][0] = dp[i-1][0] + dp[i-1][1];d...
分类:
其他好文 时间:
2014-08-26 17:25:56
阅读次数:
209
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the...
分类:
其他好文 时间:
2014-08-26 17:19:16
阅读次数:
191
Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / ...
分类:
其他好文 时间:
2014-08-26 17:17:06
阅读次数:
133
Path SumGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the give...
分类:
其他好文 时间:
2014-08-26 17:05:36
阅读次数:
156
Validate Binary Search Tree...
分类:
其他好文 时间:
2014-08-26 11:47:16
阅读次数:
198
RPM是RedHat Package Manager(RedHat软件包管理工具)类似Windows里面的“添加/删除程序”rpm 执行安装包二进制包(Binary)以及源代码包(Source)两种。二进制包可以直接安装在计算机中,而源代码包将会由RPM自动编译、安装。源代码包经常以src.rpm作...
分类:
系统相关 时间:
2014-08-26 11:23:07
阅读次数:
364