循环
文章平均质量分 67
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 258. Add Digits(数位相加)
原题网址:https://leetcode.com/problems/add-digits/ Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the proces原创 2016-04-09 05:47:27 · 1544 阅读 · 0 评论 -
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 · 2926 阅读 · 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 · 1072 阅读 · 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 · 439 阅读 · 0 评论 -
LeetCode 189. Rotate Array(旋转数组)
原题网址:https://leetcode.com/problems/rotate-array/ Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,原创 2016-05-04 01:22:23 · 2307 阅读 · 0 评论 -
LeetCode 47. Permutations II(排列)
原题网址:https://leetcode.com/problems/permutations-ii/ Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the followi原创 2016-05-21 05:23:53 · 632 阅读 · 0 评论 -
LeetCode 61. Rotate List(旋转链表)
原题网址:https://leetcode.com/problems/rotate-list/ Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4-原创 2016-05-21 09:13:10 · 921 阅读 · 0 评论 -
LeetCode 373. Find K Pairs with Smallest Sums
原题网址:https://leetcode.com/problems/find-k-pairs-with-smallest-sums/ You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists原创 2016-07-14 00:51:28 · 772 阅读 · 0 评论 -
LeetCode 396. Rotate Function
原题网址:https://leetcode.com/problems/rotate-function/ Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-wise,原创 2017-01-04 09:06:31 · 562 阅读 · 0 评论