摘要: 题目:一个数组中,求子数组(在数组中连续的N个数)和的最大值,例如{ -1,3,5,-1,4,-5}数组,最大值为11, 3+5+(-1)+4=11,在这个数组中只有这四个数相加的和是最大的 代码如下: class Program { static void Main(string[] args) { int[] arr = { -1,3,5,-1,4,-5}; int result = ... 阅读全文
posted @ 2011-06-29 22:30 槑槑 阅读(290) 评论(0) 推荐(0) 编辑