算法-数组-leetcode
文章平均质量分 52
金庸不写武侠写代码
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
<leetcode>442. Find All Duplicates in an Array
442.Find All Duplicates in an ArrayGiven 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 appear twice in this array.原创 2016-12-01 16:46:17 · 284 阅读 · 0 评论 -
<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, 1, 0, 3, 12], after原创 2016-12-13 22:08:50 · 239 阅读 · 0 评论 -
<leetcode>414. Third Maximum Number
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).Example 1: Input: [3, 2, 1]Outp原创 2016-12-07 14:16:59 · 298 阅读 · 0 评论 -
<leetcode>448.Find All Numbers Disappeared in an Array
题目描述: 448、Find All Numbers Disappeared in an Array [easy] 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 elemen原创 2016-11-27 11:22:17 · 490 阅读 · 0 评论 -
<leetcode>268. Missing Number
Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.For example, Given nums = [0, 1, 3] return 2.Note: Your algorithm should run in line原创 2016-12-15 10:36:08 · 279 阅读 · 0 评论
分享