首页 > 编程语言 > 详细

[LintCode] Continuous Subarray Sum 连续子数组之和

时间:2016-08-31 00:35:22      阅读:174      评论:0      收藏:0      [点我收藏+]

 

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 the index of the last number. (If their are duplicate answer, return anyone)

 
Example

Give [-3, 1, 3, -3, 4], return [1,4].

 

[LintCode] Continuous Subarray Sum 连续子数组之和

原文:http://www.cnblogs.com/grandyang/p/5824192.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!