Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For e...
分类:
其他好文 时间:
2014-11-12 19:42:37
阅读次数:
186
大家好,双十一光棍节来了,疯狂购物的同时,别忘了晓晓神给大家带来的千金换不来的小知识点哦。O(∩_∩)O!Rocks头结点更改publicIP上网IP地址安装之前啊咱们注意几点和学习几个概念:------------------------------------------------------------------Definitions:>>..
分类:
其他好文 时间:
2014-11-11 23:06:44
阅读次数:
551
Login remote server without typing password with ssh....
分类:
其他好文 时间:
2014-11-11 22:49:58
阅读次数:
281
题目描述:
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?
思路:
设置一个快指针fast,一个慢指针slow。快指...
分类:
其他好文 时间:
2014-11-11 16:41:06
阅读次数:
179
题目描述:
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
思路:初始化一个快指针fast,一个慢指针slow。快指针一次移动两个单位,慢指针一次移动一个单位。如果链表有环,则两指针必然会相遇。否则若fas...
分类:
其他好文 时间:
2014-11-11 16:40:35
阅读次数:
208
问题描述和思路下午做svn钩子文档时,开发大哥跑来,说mysql启动报错,半个小时没找到解决的办法,报错内容为:StartingMySQL.ERROR!TheserverquitwithoutupdatingPIDfile!根据大哥的描述,马上想到可能是mysql高速运行下,做大量数据查询时候,卡的时候,强制杀掉mysql数据库..
分类:
数据库 时间:
2014-11-11 14:32:40
阅读次数:
221
Divide two integers without using multiplication, division and mod operator.
显然,如果光用减法太慢。让商为N,那么需要用O(N)的时间。这里要求比较苛刻,连乘法都不能使用,所以只能寄希望于二进制操作了。
这里可以把除数表示为:dividend = 2^i * divisor + 2^(i-1) * divisor +...
分类:
其他好文 时间:
2014-11-11 02:02:27
阅读次数:
214
Divide two integers without using multiplication, division and mod operator.显然,如果光用减法太慢。让商为N,那么需要用O(N)的时间。这里要求比较苛刻,连乘法都不能使用,所以只能寄希望于二进制操作了。这里可以把除数表示为:...
分类:
其他好文 时间:
2014-11-11 01:57:47
阅读次数:
215
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space?怎样判断一个链表之中是否有环?可以利用快慢指针的方法。定义两个指针fast和slo...
分类:
其他好文 时间:
2014-11-10 23:15:29
阅读次数:
289
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space. 1 public class Solution { 2 public boolean isPalindrom...
分类:
其他好文 时间:
2014-11-09 23:37:34
阅读次数:
209