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
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
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
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
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
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 ...
题目链接: 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
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