
LeetCode(Array)
文章平均质量分 76
BestFSQ
这个作者很懒,什么都没留下…
展开
-
LeetCode--283. Move Zeroes
283. Move Zeroes题目描述:Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0,原创 2017-02-24 22:48:30 · 419 阅读 · 0 评论 -
LeetCode--485. Max Consecutive Ones
485. Max Consecutive Ones题目描述:Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits o原创 2017-02-25 09:23:26 · 603 阅读 · 0 评论 -
LeetCode--448. Find All Numbers Disappeared in an Array
448. 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.Find all the elements原创 2017-02-25 09:48:49 · 533 阅读 · 0 评论 -
LeetCode--442. Find All Duplicates in an Array
442. Find All Duplicates in an Array题目描述:Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appe原创 2017-02-25 10:29:08 · 367 阅读 · 0 评论