码迷,mamicode.com
首页 >  
搜索关键字:subarray    ( 846个结果
ArrayUtils
1 package template; 2 3 import org.apache.commons.lang3.ArrayUtils; 4 import org.apache.commons.logging.Log; 5 import org.apache.commons.logging.LogFa... ...
分类:其他好文   时间:2016-12-22 11:41:01    阅读次数:270
Leetcode: Range Addition
Time Complexity: O(N+K), Space: O(1) ...
分类:其他好文   时间:2016-12-18 14:32:31    阅读次数:210
【leetcode】Maximum Subarray (53)
1. Maximum Subarray (#53) Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given ...
分类:其他好文   时间:2016-12-17 11:39:35    阅读次数:188
152. Maximum Product Subarray (Array; DP)
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],th ...
分类:其他好文   时间:2016-12-12 01:36:49    阅读次数:186
leetcode 152. Maximum Product Subarray --------- java
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 ...
分类:编程语言   时间:2016-11-19 02:09:34    阅读次数:198
HDU 5869 Different GCD Subarray Query 树状数组 + 一些数学背景
http://acm.hdu.edu.cn/showproblem.php?pid=5869 题意:给定一个数组,然后给出若干个询问,询问[L, R]中,有多少个子数组的gcd是不同的。 就是[L, R]中不同区间的gcd值,有多少个是不同的。 给个样例 3 37 7 71 21 33 3 数学背景 ...
分类:编程语言   时间:2016-11-10 14:18:03    阅读次数:358
array / matrix subarray/submatrix sum
Maximal Subarray Sum : O(n) scan-and-update dynamic programming,https://en.wikipedia.org/wiki/Maximum_subarray_problem, https://leetcode.com/problems/ ...
分类:其他好文   时间:2016-11-07 07:49:08    阅读次数:203
053. Maximum Subarray
方法二:动态规划 ...
分类:其他好文   时间:2016-10-31 09:09:55    阅读次数:176
2016 ACM/ICPC Asia Regional Dalian Online
B Different GCD Subarray Query 题意:长度n的序列, m个询问区间[L, R], 问区间内的所有子段的不同GCD值有多少种. Sample Input 5 3 1 3 4 6 9 3 5 2 5 1 5 5 3 1 3 4 6 9 3 5 2 5 1 5 Sample ...
分类:其他好文   时间:2016-10-29 21:52:09    阅读次数:237
Subarray Sum Closest
Question Given an integer array, find a subarray with sum closest to zero. Return the indexes of the first number and last number. Given [-3, 1, 1, -3 ...
分类:其他好文   时间:2016-10-25 02:54:33    阅读次数:225
846条   上一页 1 ... 40 41 42 43 44 ... 85 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!