码迷,mamicode.com
首页 >  
搜索关键字:subarray    ( 846个结果
lintcode-medium-Minimum Size Subarray Sum
Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return ...
分类:其他好文   时间:2016-03-31 18:33:57    阅读次数:143
经典算法——连续子数组的最大乘积
Maximum Product Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous s...
分类:编程语言   时间:2016-03-31 17:02:53    阅读次数:206
lintcode-medium-Maximum Subarray II
Given an array of integers, find two non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguous.Return the ...
分类:其他好文   时间:2016-03-30 14:34:53    阅读次数:173
[LeetCode] Maximum Size Subarray Sum Equals k 最大子数组之和为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. Example 1: Given ...
分类:编程语言   时间:2016-03-30 12:56:33    阅读次数:249
leetcode:Minimum Subarray
1、 Given an array of integers, find the subarray with smallest sum. Return the sum of the subarray. For [1, -1, -2, 1], return -3 2、 1、只需要求出最小值 2、利用su ...
分类:其他好文   时间:2016-03-28 18:48:02    阅读次数:141
[LeetCode][JavaScript]Maximum Subarray
Maximum Subarray Maximum Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example ...
分类:编程语言   时间:2016-03-27 23:55:18    阅读次数:252
C#解leetcode 152. Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],t ...
分类:Windows程序   时间:2016-03-24 16:23:52    阅读次数:252
codeforces 86D D. Powerful array(莫队算法)
题目链接: D. Powerful array An array of positive integers a1,?a2,?...,?an is given. Let us consider its arbitrary subarray al,?al?+?1...,?ar, where 1?≤?l
分类:编程语言   时间:2016-03-23 00:39:55    阅读次数:260
Leetcode 53 Maximum Subarray
分类:其他好文   时间:2016-03-16 22:36:17    阅读次数:169
lintcode-medium-Continuous Subarray Sum
Given an integer array, find a continuous subarray where the sum of numbers is the biggest. Your code should return the index of the first number and
分类:其他好文   时间:2016-03-16 13:57:57    阅读次数:172
846条   上一页 1 ... 49 50 51 52 53 ... 85 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!