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
Difference Between Primes
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Description
All you know Goldbach conjecture.That is to say, Every even integer greate...
分类:
其他好文 时间:
2014-08-09 18:54:18
阅读次数:
272
var num=7;switch(true){case num = 0 && num<= 10: alert("between 0 and 10"); break;default: alert("more than 10");}switch语句在比较值时使用的是全等操作符,因此不会发生类型转换。在s...
分类:
其他好文 时间:
2014-08-09 18:15:48
阅读次数:
222
A system switches between non-secure and secure modes by making processes, applications, and data for the non-secure mode unavailable to the secure mo...
分类:
其他好文 时间:
2014-08-07 12:55:00
阅读次数:
318
Problem DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between vil...
分类:
其他好文 时间:
2014-08-06 18:02:11
阅读次数:
275
这道题的题意其实有点略晦涩,定义f(a,b)为minimum of verticesnoton the path between vertices a and b. 其实它加一个minimum index of vertices应该会好理解一点吧。看了一下题解,还有程序,才理清思路。首先比较直接的是...
分类:
其他好文 时间:
2014-08-06 14:27:11
阅读次数:
270
Problem B: The Largest Clique
Given a directed graph G, consider the following transformation. First, create a new graph T(G) to have the same vertex set as G. Create a directed edge between two ve...
分类:
其他好文 时间:
2014-08-05 19:26:40
阅读次数:
365
Common WordsLet's continue examining words. You are given two string with words separated by commas. Try to find what is common between these strings....
分类:
其他好文 时间:
2014-08-05 10:54:19
阅读次数:
190
DescriptionGreg has a weighed directed graph, consisting ofnvertices. In this graph any pair of distinct vertices has an edge between them in both dir...
分类:
其他好文 时间:
2014-08-04 13:30:27
阅读次数:
317