码迷,mamicode.com
首页 >  
搜索关键字:subarray    ( 846个结果
[?]*Maximum Size Subarray Sum Equals k
Given an arraynumsand a target valuek, find the maximum length of a subarray that sums tok. If there isn't one, return 0 instead.Example 1:Givennums=[...
分类:其他好文   时间:2016-01-12 07:43:37    阅读次数:219
【数组】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...
分类:编程语言   时间:2016-01-09 12:23:58    阅读次数:225
Lintcode: Minimum Subarray
Given an array of integers, find the subarray with smallest sum.Return the sum of the subarray.Have you met this question in a real interview? YesExam...
分类:其他好文   时间:2016-01-09 07:32:10    阅读次数:164
lintcode 中等题:maximum subarray difference 最大子数组差
题目最大子数组差给定一个整数数组,找出两个不重叠的子数组A和B,使两个子数组和的差的绝对值|SUM(A) - SUM(B)|最大。返回这个最大的差值。样例给出数组[1, 2, -3, 1],返回 6注意子数组最少包含一个数挑战时间复杂度为O(n),空间复杂度为O(n)解题刚做了数组中两个子数组和的最...
分类:编程语言   时间:2016-01-06 23:29:58    阅读次数:1243
lintcode 中等题:maximum subarray最大子数组II
题目最大子数组 II给定一个整数数组,找出两个不重叠子数组使得它们的和最大。每个子数组的数字在数组中的位置应该是连续的。返回最大的和。您在真实的面试中是否遇到过这个题?Yes样例给出数组[1, 3, -1, 2, -1, 2],这两个子数组分别为[1, 3]和[2, -1, 2]或者[1, 3, -...
分类:编程语言   时间:2016-01-06 21:59:59    阅读次数:690
Leetcode: 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.Example 1:Given n...
分类:其他好文   时间:2016-01-06 06:45:16    阅读次数:217
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...
分类:其他好文   时间:2015-12-27 09:37:59    阅读次数:191
[LeetCode53]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...
分类:其他好文   时间:2015-12-23 00:30:52    阅读次数:182
[LeetCode] Minimum Size Subarray Sum 解题思路
Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return 0 i...
分类:其他好文   时间:2015-12-19 16:32:00    阅读次数:173
[lintcode medium]Maximum Subarray Difference
Maximum Subarray DifferenceGiven an array with integers.Find two non-overlapping subarrays A and B, which |SUM(A) - SUM(B)| is the largest.Return the ...
分类:其他好文   时间:2015-12-18 08:02:30    阅读次数:231
846条   上一页 1 ... 51 52 53 54 55 ... 85 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!