上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 64 下一页
摘要: Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you 阅读全文
posted @ 2017-09-18 16:34 __Meng 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space fo 阅读全文
posted @ 2017-09-18 16:06 __Meng 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the 阅读全文
posted @ 2017-09-17 15:49 __Meng 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of longest continuous increasing subsequence. Example 1: Example 2: 在未排序的数组中,找出最长递增序列的长度 c++(16ms 阅读全文
posted @ 2017-09-16 15:51 __Meng 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2017-09-14 09:50 __Meng 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 如果一个数组里所有数都不同,则返回false 如果有重复数字,则返回true C++(36ms): 阅读全文
posted @ 2017-09-13 16:33 __Meng 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 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 of [1, n] 阅读全文
posted @ 2017-07-10 13:01 __Meng 阅读(154) 评论(0) 推荐(0) 编辑
摘要: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. 阅读全文
posted @ 2017-07-08 20:37 __Meng 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Input: [1,2,3] Output: 6 Example 2: Inp 阅读全文
posted @ 2017-07-06 13:33 __Meng 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: 阅读全文
posted @ 2017-07-04 13:50 __Meng 阅读(123) 评论(0) 推荐(0) 编辑
上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 64 下一页