2009年6月9日

Maximum subsequence sum

摘要: This is a very famous problem from programming pealsGiven an array of integers, return the maximum subsequence sum of the array, if the maximus sumless than 0, return 0Example1, 2, -6, 3, -2, 4, -1, 3... 阅读全文

posted @ 2009-06-09 17:08 前端风云志 阅读(419) 评论(0) 推荐(0)

Consecutive sequence with sum 0

摘要: You are given an integer array which contains positive integers, zero and negetive integerscount how many consecutive sequences in this array make a sum of 0.exmapleint[] a = {4, -1, 2, 1, -2, -1, 5, ... 阅读全文

posted @ 2009-06-09 16:26 前端风云志 阅读(410) 评论(0) 推荐(0)

导航

关注我

前端风云志