码迷,mamicode.com
首页 >  
搜索关键字:subarray    ( 846个结果
53. Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, ...
分类:其他好文   时间:2018-01-19 00:24:53    阅读次数:185
[leetcode]Map-560. Subarray Sum Equals K
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = ...
分类:其他好文   时间:2018-01-13 20:51:43    阅读次数:142
Map-560. Subarray Sum Equals K
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Note: ...
分类:其他好文   时间:2018-01-13 11:19:26    阅读次数:143
718. Maximum Length of Repeated Subarray
#week9 Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Input: A: [1,2,3,2,1] B: [3, ...
分类:其他好文   时间:2018-01-13 11:09:31    阅读次数:156
44. 最小子数组
给定一个整数数组,找到一个具有最小和的子数组。返回其最小和。 子数组最少包含一个数字 样例 给出数组[1, -1, -2, 1],返回 -3 动态规划 原数组为nums[] 令S[i]为到i为止的最小和 那么S[i]=min{nums[i], nums[i]+S[i-1] } basecase: S ...
分类:编程语言   时间:2017-12-30 12:39:07    阅读次数:120
Leetcode 325: Maximum Size Subarray Sum Equals k
Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead. Note:The sum of ...
分类:其他好文   时间:2017-12-28 11:41:09    阅读次数:137
689. Maximum Sum of 3 Non-Overlapping Subarrays
Max Sum of Subarray with size k, 相当于Easy难度,我说用一个sum array存sum,然后做减法就行。中国小哥说让优化空间,于是说可以只用两个数。 The question asks for three non-overlapping intervals wit ...
分类:移动开发   时间:2017-12-19 15:29:11    阅读次数:205
53. Maximum Subarray最大子数组
[抄题]: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4 ...
分类:编程语言   时间:2017-12-10 11:26:45    阅读次数:169
Leetcode 209: Minimum Size Subarray Sum
Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't ...
分类:其他好文   时间:2017-11-29 13:37:09    阅读次数:118
leetCode-Maximum Average Subarray I
leetCode-Maximum Average Subarray I ...
分类:其他好文   时间:2017-11-26 21:04:37    阅读次数:141
846条   上一页 1 ... 29 30 31 32 33 ... 85 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!