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
题目一:Populating
Next Right Pointers in Each Node
Given a binary tree
struct TreeLinkNode {
TreeLinkNode *left;
TreeLinkNode *right;
TreeLinkNode *next;
}
Popul...
分类:
其他好文 时间:
2014-08-12 09:03:43
阅读次数:
201
翻译说明:这是一个日本人写的用户态下的函数tracer, 我们知道系统调用可以用strace, 库调用可以使用ltrace, 但是linux下竟然没有一个比较有名的用户程序的tracer, 这真是比较奇怪。目前这个工具只支持x86架构,arm之类的嵌入式环境不支持。以后有时候自己写一个tracer。
原文来自: http://binary.nahi.to/hogetrace/
trac...
分类:
其他好文 时间:
2014-08-12 00:45:23
阅读次数:
500
先上题目:Binary Search Heap ConstructionTime Limit:5 Seconds Memory Limit:32768 KBRead the statement of problem G for the definitions concerning trees. In...
分类:
其他好文 时间:
2014-08-11 23:57:23
阅读次数:
895
Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the be...
分类:
其他好文 时间:
2014-08-11 21:13:02
阅读次数:
219
expressionexpr ::= expr binary-op expr |expr [NOT] like-op expr [ESCAPE expr] |unary-op expr |( expr ) |column-name |table-name . column-name |databas...
分类:
数据库 时间:
2014-08-11 17:22:52
阅读次数:
300
Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3]...
分类:
其他好文 时间:
2014-08-11 11:53:42
阅读次数:
185