Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:
其他好文 时间:
2015-08-16 16:21:54
阅读次数:
142
Add DigitsGiven a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is...
分类:
其他好文 时间:
2015-08-16 15:11:22
阅读次数:
80
Android开发中,控制台(Console)输出警告信息:ActivityManager: Warning: Activity not started, its current task has been brought to the front愿意可能是你的模拟器中还有东西在运行,也就是你要运行...
分类:
其他好文 时间:
2015-08-16 15:09:47
阅读次数:
97
The Unique MSTTime Limit:1000MSMemory Limit:10000KTotal Submissions:24201Accepted:8596DescriptionGiven a connected undirected graph, tell if its minim...
分类:
其他好文 时间:
2015-08-16 15:05:24
阅读次数:
130
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].
分类:
其他好文 时间:
2015-08-16 15:02:27
阅读次数:
102
DescriptionThere arencities numbered from 1 tonin Berland. Some of them are connected by two-way roads. Each road has its own length — an integer numb...
分类:
其他好文 时间:
2015-08-16 12:14:40
阅读次数:
109
Problem DescriptionThere is a big stone with smooth surface in Tina Town. When people go towards it, the stone surface will be lighted and show its us...
分类:
其他好文 时间:
2015-08-16 02:03:07
阅读次数:
179
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-08-15 22:42:42
阅读次数:
138
Given a binary tree
struct TreeLinkNode {
TreeLinkNode *left;
TreeLinkNode *right;
TreeLinkNode *next;
}
Populate each next pointer to point to its next right node....
分类:
其他好文 时间:
2015-08-15 20:10:22
阅读次数:
119
A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index....
分类:
其他好文 时间:
2015-08-15 18:13:37
阅读次数:
90