坑爹地多次过,全都是写程序时不注意的小问题,书写习惯还需要进一步改善。遇到的bug有:忘记return语句;定义ListNode
runner = head.next,却将判断head==null的情况放在这句之后;
忘记了新的head将不会是原来的那个head,而是head.next;所以以后遇到...
分类:
其他好文 时间:
2014-05-10 06:59:37
阅读次数:
320
Problem DescriptionA tree is a well-known data
structure that is either empty (null, void, nothing) or is a set of one or more
nodes connected by dire...
分类:
其他好文 时间:
2014-05-10 03:18:52
阅读次数:
374
关于分区:
挂载点装置说明//dev/hda115G/home/dev/hda2最大的剩余空间/boot/dev/hda3200MB左右swap/dev/hda5大约内存大小(建议至少512MB)/var/dev/hda6视服务器功能决定大小
/ 20G /boot 用于挂载boot,...
分类:
其他好文 时间:
2014-05-10 00:33:59
阅读次数:
348
题目:
Clone an undirected graph. Each node in the graph contains a label and
a list of its neighbors.
OJ's undirected graph serialization:
Nodes are labeled uniquely.
We use # as a separat...
分类:
其他好文 时间:
2014-05-09 22:31:35
阅读次数:
353
Generate ParenthesesGiven n pairs of parentheses,
write a function to generate all combinations of well-formed parentheses.For
example, given n = 3, a...
分类:
其他好文 时间:
2014-05-09 20:09:32
阅读次数:
333
Clustering
coefficient的定义有两种;全局的和局部的。全局的算法基于triplet。首先解释triplet。triplet 包含 open triplet 和
closed triplet 两种(A triplet is three nodes that are connecte...
分类:
其他好文 时间:
2014-05-09 05:28:02
阅读次数:
280
internal class CacheHelper { /// /// Insert
value into the cache using /// appropriate name/value pairs /// //...
分类:
其他好文 时间:
2014-05-09 04:19:56
阅读次数:
246
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(())", "()()...
分类:
其他好文 时间:
2014-05-09 02:29:07
阅读次数:
302
1、Clone Graph
Clone an undirected graph. Each node in the graph contains a label and
a list of its neighbors.
OJ's undirected graph serialization:
Nodes are labeled uniquely.
We use # as...
分类:
其他好文 时间:
2014-05-09 02:17:58
阅读次数:
336
swap分区交换空间,正是因为交换空间的存在,使我们的内存可以过载使用。在物理买内存不足的情况下,拿swap来应急。free:查看当前系统上物理内存和交换空间的使用情况。-m[root@vim-ap~]#freetotalusedfreesharedbufferscachedMem:1026868419232607636023704284224-/+buffers/..
分类:
系统相关 时间:
2014-05-08 16:55:16
阅读次数:
435