Use one queue + size variable 1 public class Solution { 2 public ArrayList> levelOrder(TreeNode root) { 3 ArrayList result = new ArrayList...
分类:
其他好文 时间:
2015-10-26 01:49:59
阅读次数:
300
Given $0<s<u<v<1$ and $s<t<v$, one can construct a Cantor set $E\subset [0,1]$ such that $\dim_H E=s, \dim_P E=t, \underline{\dim}_B E=u$ and $\overli...
分类:
其他好文 时间:
2015-10-26 00:29:11
阅读次数:
104
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2015-10-25 13:31:05
阅读次数:
131
One Person GameTime Limit: 2 Seconds Memory Limit: 65536 KBThere is an interesting and simple one person game. Suppose there is a number axis under...
分类:
其他好文 时间:
2015-10-25 12:14:49
阅读次数:
164
S.O.L.I.D是面向对象设计和编程(OOD&OOP)中几个重要编码原则(Programming Priciple)的首字母缩写。 单一责任原则: 当需要修改某个类的时候原因有且只有一个(THERE SHOULD NEVER BE MORE THAN ONE REASON FOR A CLASS ...
分类:
其他好文 时间:
2015-10-25 09:37:11
阅读次数:
222
private final String MESSAGE_WARN = "您输入的密码有误,请重新输入!";private final String CLASS_ONE = "class1";this.calculateNumberOfClass(CLASS_ONE);Toast.makeText(...
分类:
移动开发 时间:
2015-10-24 23:15:29
阅读次数:
184
DescriptionGood news for us: to release the financial pressure, the government started selling galaxies and we can buy them from now on! The first one...
分类:
其他好文 时间:
2015-10-24 21:59:03
阅读次数:
244
NUMBER BASE CONVERSIONTime Limit:1000MSMemory Limit:10000KTotal Submissions:4652Accepted:2132DescriptionWrite a program to convert numbers in one base...
分类:
其他好文 时间:
2015-10-24 21:42:45
阅读次数:
150
DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-w...
分类:
其他好文 时间:
2015-10-24 17:11:32
阅读次数:
170
1、问题在CentOS下使用yum安装软件,结果出现了下面的错误提示:# yum installThere was a problem importing one of the Python modulesrequired to run yum. The error leading to this ...
分类:
其他好文 时间:
2015-10-24 17:07:13
阅读次数:
1390