快慢指针
文章平均质量分 58
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 142. Linked List Cycle II(循环链表)
原题网址:https://leetcode.com/problems/linked-list-cycle-ii/Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.原创 2016-05-26 03:07:42 · 1067 阅读 · 0 评论 -
LeetCode 141. Linked List Cycle(链表循环)
原题网址:https://leetcode.com/problems/linked-list-cycle/Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?方法:使用两个指针。/** * Defini原创 2016-05-27 00:22:22 · 436 阅读 · 0 评论 -
LeetCode 202. Happy Number(快乐数字)
原题网址:https://leetcode.com/problems/happy-number/Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive原创 2016-05-04 05:56:13 · 1165 阅读 · 0 评论