Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?思路:...
分类:
其他好文 时间:
2015-09-28 19:00:08
阅读次数:
162
There are mainly two solutions to solve this problem.The first one is very clever, using the idea of cycle detection, and runs in O(n) time. You may r...
分类:
其他好文 时间:
2015-09-28 18:57:25
阅读次数:
163
Description:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?在不借助辅助空间的情况下判断一个链表是否存在回路。可以用两个...
分类:
其他好文 时间:
2015-09-28 18:44:08
阅读次数:
133
据Foote Partners的最新调查:如今,你掌握的 IT 技能的多少决定了你薪资的多少,但你不一定非要比开源架构师或Certified Secure Software Life Cycle Professional那样做的很好。Foote在四月至七月之间做了一个关于TOGAF(企业架构)最有价...
分类:
其他好文 时间:
2015-09-27 14:59:18
阅读次数:
225
优化 digest cycle 只监听必要的变量(例如:在进行实时通讯时,不要在每次接收到消息时触发?$digest?loop) 对于那些只初始化一次并不再改变的内容, 使用一次性 watcherbindonce?对于早期的 AngularJS 或者一次...
分类:
其他好文 时间:
2015-09-25 20:30:15
阅读次数:
318
1. 何时使用delegate 与 block;2. block 造成的retain cycle;3. 慎用NSMutable..., 可能不经意间修改了数据4. Addressbook 框架(iOS9后换成了contact框架,貌似更好用)5. custom table view cell6.UI...
分类:
移动开发 时间:
2015-09-22 21:59:09
阅读次数:
186
个人读书笔记,对书上的知识点根据个人理解进行部分补充。通过简单的描述,有助于对Activity life cycle的理解和记忆。
分类:
移动开发 时间:
2015-09-21 06:58:50
阅读次数:
274
个人读书笔记,对书上的知识点根据个人理解进行部分补充。Activity life cycle部分将另起篇章。
分类:
移动开发 时间:
2015-09-21 06:58:17
阅读次数:
176
在Linked List Cycle题目中,使用了两个指针fast与slow检查链表是否有环,该题在此基础上,要求给出链表中环的入口位置,同样需要注意空间复杂度。...
分类:
其他好文 时间:
2015-09-17 17:37:40
阅读次数:
189
题目的意思是给定一个链表的头指针,快速判断一个链表是不是有环,如果有环,返回环的起始位置。该题的经典做法是使用两个指针,两个指针均指向头结点,其中一个是快指针,一次走两步;另一个是慢指针,一次只走一步,当两个指针相遇时,证明有环。...
分类:
其他好文 时间:
2015-09-17 13:40:56
阅读次数:
166