#define NULL 0class Solution {public: vector preorderTraversal(TreeNode *root) { stack s; vector v1; if(root!=NULL) s.p...
分类:
其他好文 时间:
2014-08-14 13:35:48
阅读次数:
210
Php: BCMathbc是Binary Calculator的缩写。bc*函数的参数都是操作数加上一个可选的 [int scale],比如string bcadd(string $left_operand, string $right_operand[, int $scale]),如果scale没...
分类:
Web程序 时间:
2014-08-14 13:26:48
阅读次数:
258
Description
Problem B - BFS (Binary Fibonacci String)
We are familiar with the Fibonacci sequence (1, 1, 2, 3, 5, 8, ...). What if we define a similar sequence for strings? Sounds interesting? Let...
分类:
其他好文 时间:
2014-08-14 10:45:58
阅读次数:
252
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio...
分类:
其他好文 时间:
2014-08-13 22:17:17
阅读次数:
189
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which...
分类:
其他好文 时间:
2014-08-13 18:17:26
阅读次数:
208
原题:
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...
分类:
其他好文 时间:
2014-08-13 15:03:31
阅读次数:
261
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2014-08-13 14:39:26
阅读次数:
153
DescriptionHardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter.America's...
分类:
其他好文 时间:
2014-08-13 12:59:56
阅读次数:
245
1 class Solution { 2 public: 3 vector postorderTraversal(TreeNode *root) { 4 if(root->left == NULL && root->right == NULL) 5 { 6 ...
分类:
其他好文 时间:
2014-08-13 10:16:05
阅读次数:
168
把数据和指令从可执行文件中提取出来的命令: objcopy -O binary -j .text a.out text.bin?? 代码段 objcopy -O binary -j .data a.out data.bin? 数据段 ELF可执行文件格式 gcc -S hello.c 生成汇编代码 file...
分类:
编程语言 时间:
2014-08-13 01:24:45
阅读次数:
281