循环检测
文章平均质量分 65
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 287. Find the Duplicate Number(找重复数字)
原题网址:https://leetcode.com/problems/find-the-duplicate-number/Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate nu原创 2016-04-15 07:02:18 · 2914 阅读 · 1 评论 -
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 评论 -
LeetCode 41. First Missing Positive(查找缺失的正数)
原题网址:https://leetcode.com/problems/first-missing-positive/Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] retur原创 2016-05-20 10:41:19 · 406 阅读 · 0 评论 -
LeetCode 448. Find All Numbers Disappeared in an Array
原题网址:https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.原创 2017-01-07 02:21:11 · 837 阅读 · 0 评论