标签:find hit 最大 ons one data href str tco
Given an array of integers, find a contiguous subarray which has the largest sum.
The subarray should contain at least one number.
Given the array [−2,2,−3,4,−1,2,1,−5,3]
, the contiguous subarray [4,−1,2,1]
has the largest sum = 6
.
Can you do it in time complexity O(n)?
s
[LintCode] Maximum Subarray 最大子数组
标签:find hit 最大 ons one data href str tco
原文地址:http://www.cnblogs.com/grandyang/p/6238721.html