Preference-defalut: 【将Tab键自动替换为4个空格】 // The number of spaces a tab is considered equal to “tab_size”: 4, // Set to true to insert spaces when tab is pressed “translate_tabs_to_space...
分类:
其他好文 时间:
2014-08-12 10:33:04
阅读次数:
210
Problem:
Sort a linked list in O(n log n)
time using constant space complexity.
解题思路:
首先,时间复杂度能达到O(nlgn)的排序算法,常见的有3种:堆排序、归并排序和快速排序,
而对于链表,用堆排序显然不太可能,所以,我们可用归并或者是快排.由于合并...
分类:
其他好文 时间:
2014-08-12 00:45:13
阅读次数:
217
1.4GT调优 Stackoverflow有一则关于4GT提问:http://stackoverflow.com/questions/2883206/maximum-size-of-application-memory-space-on-32-x86-2-gb-or-1-gb/2883252#28....
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?思路...
分类:
其他好文 时间:
2014-08-11 20:48:22
阅读次数:
220
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:使用两个指针slow和fast,分别以1和2的速度遍历链表。若链表中存在环,则...
分类:
其他好文 时间:
2014-08-11 20:45:12
阅读次数:
230
一个没有把百酒都尝遍的人,是不会体会到清水之味的~Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more di...
分类:
其他好文 时间:
2014-08-11 17:40:22
阅读次数:
237
一、IFS 介绍 Shell 脚本中有个变量叫 IFS(Internal Field Seprator),内部域分隔符。完整定义是The shell uses the value stored in IFS, which is the space, tab, and newline charact....
分类:
其他好文 时间:
2014-08-11 14:44:42
阅读次数:
242
png图片在ie8下有黑色边框的情况想必大家都有遇到过吧,那么该怎么解决呢?其实很简单,下面的方法或许对大家有所帮助background-image:url(******.png)!important; background-image:url(../images/space.gif);/*spac...
分类:
其他好文 时间:
2014-08-11 14:37:52
阅读次数:
197
题目链接:
啊哈哈,点我点我
题意:
就是空间站之间有很多球形的东西,然后这些球可能相交,如果相加那么距离为0,否则距离为两球表面的距离,最后求联通这些球形实验室所需要的最小距离。。。
思路:
相信大家都学过圆相交吧,类推到球是一样的,当两球的距离大于两球的半径之和的时候,说明两球不想交,反之则两球相交,转换成公式为d-(r1+r2)>0则说明两球不相交。。。
建图后基本上就是套模...
分类:
其他好文 时间:
2014-08-11 00:31:49
阅读次数:
260
ASSIC码对照表ASCII值控制字符ASCII值控制字符ASCII值控制字符ASCII值控制字符0NUT32(space)64@96、1SOH33!65A97a2STX34”66B98b3ETX35#67C99c4EOT36$68D100d5ENQ37%69E101e6ACK38&70F102f7...
分类:
其他好文 时间:
2014-08-10 23:53:31
阅读次数:
429