码迷,mamicode.com
首页 >  
搜索关键字:subarray    ( 846个结果
[Leetcode]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,1,...
分类:其他好文   时间:2015-03-15 02:00:27    阅读次数:116
Lintcode: Maximum Subarray III
Given an array of integers and a number k, find k non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguou...
分类:其他好文   时间:2015-03-14 12:16:06    阅读次数:198
leetcode -- 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,1,?5,4], the contiguous subarray [4,?1,2,1]...
分类:其他好文   时间:2015-03-14 10:59:57    阅读次数:122
Lintcode: Maximum Subarray Difference
Given an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Return the largest difference.NoteThe ...
分类:其他好文   时间:2015-03-14 06:11:46    阅读次数:565
Lintcode: 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 ...
分类:其他好文   时间:2015-03-14 06:10:35    阅读次数:198
Maximum Subarray
这道题需要明确一个思路,如果最终最大解的区间是i,j,那么,对于i和j中任一一个值k,有这样的性质,从i到k的和一定不能小于0。知道这个性质后,程序就比较简单了。class Solution {public: int maxSubArray(int A[], int n) { i...
分类:其他好文   时间:2015-03-14 00:58:44    阅读次数:140
[LeetCode]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 subarray [2,3] has th...
分类:其他好文   时间:2015-03-13 23:49:17    阅读次数:249
LeetCode 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,1,?5,4], the contiguous subarray [4,?1,2,1] ha...
分类:其他好文   时间:2015-03-13 00:28:08    阅读次数:187
【LeetCode】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,1,?5,4], the contiguous subarray [4,?1,2,1] has the largest sum = 6....
分类:其他好文   时间:2015-03-12 22:42:13    阅读次数:158
LeetCode Maximum Subarray
1.题目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,1,?5,4],the contiguous subarray [4,?1,2,1] has...
分类:其他好文   时间:2015-03-12 11:38:49    阅读次数:120
846条   上一页 1 ... 67 68 69 70 71 ... 85 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!