2013年4月13日

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 阅读(324) 评论(0) 推荐(0) 编辑

Maximum Sum (二维)

摘要: 108 - Maximum Sumhttp://online-judge.uva.es/p/v1/108.htmlQuite similar to 10074 and 10667.[edit]SummaryGiven annbyntwo-dimensional arrayarr(1 < =n< = 100) of arbitrary integers, find the maximum sub-array. Maximum sub-array is defined to be the sub-array whose sum of integer elements are the m 阅读全文

posted @ 2013-04-13 12:23 Step-BY-Step 阅读(201) 评论(0) 推荐(0) 编辑

Chp1: Arrays and Strings

摘要: HashTableArrayLinkedListBinary Search TreeArrayListStringBuffer 阅读全文

posted @ 2013-04-13 02:12 Step-BY-Step 阅读(105) 评论(0) 推荐(0) 编辑

导航