Kadane's Algorithm
摘要:
Kadane's Algorithmis anO(n)algorithm for finding the maximum contiguoussubsequencein a one-dimensionalsequence.[edit]PseudocodeThe algorithm keeps track of the tentative maximum subsequence in(maxSum, maxStartIndex, maxEndIndex). It accumulates a partial sum incurrentMaxSumand updates the optima 阅读全文
posted @ 2013-04-13 12:27 Step-BY-Step 阅读(339) 评论(0) 推荐(0)