Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1...
分类:
其他好文 时间:
2014-08-11 11:45:02
阅读次数:
251
Problem Description
TIANKENG manages a restaurant after graduating from ZCMU, and tens of thousands of customers come to have meal because of its delicious dishes. Today n groups of customers come to...
分类:
其他好文 时间:
2014-08-11 00:24:41
阅读次数:
248
Consider integer numbers from 1 to n. Let us call the sum of digits of an integer number its weight. Denote the weight of the number x as w(x).
Now let us order the numbers using so called graduated ...
分类:
其他好文 时间:
2014-08-10 18:47:20
阅读次数:
406
The C++ standard says nothing about how implementations should manage template i nstantiation, so every implementation handles instantiation in its ow...
分类:
编程语言 时间:
2014-08-10 10:18:20
阅读次数:
300
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
zigzag层序遍历树
For example:
Given binary...
分类:
其他好文 时间:
2014-08-09 23:19:59
阅读次数:
363
Description
Problem E: Chainsaw Massacre
Background
As every year the Canadian Lumberjack Society has just held its annual woodcutting competition and the national forest...
分类:
其他好文 时间:
2014-08-09 18:53:58
阅读次数:
261
Description
Ouroboros is a mythical snake from ancient Egypt. It has its tail in its mouth and continously devours itself.
The Ouroboros numbers are binary numbers of 2^n bits that have the prop...
分类:
其他好文 时间:
2014-08-09 11:40:57
阅读次数:
315
There are a few scenarios in which your activity is destroyed due to normal app behavior, such as when the user presses the Back button or your activity signals its own destruction by calling finish(). The system may also destroy your activity if it's curr...
分类:
移动开发 时间:
2014-08-09 02:35:56
阅读次数:
492
Binary Tree Postorder TraversalGiven a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \...
分类:
其他好文 时间:
2014-08-08 23:58:26
阅读次数:
485
Binary Tree Level Order Traversal IIGiven a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level...
分类:
其他好文 时间:
2014-08-08 23:53:16
阅读次数:
221