Improved Algorithms for the K-Maximum Subarray Problem
Authors:
- 19 December 2005
- journal article
- Published by Oxford University Press (OUP) in The Computer Journal
- Vol. 49 (3) , 358-374
Abstract
The maximum subarray problem is to find the contiguous array elements having the largest possible sum. We extend this problem to find K maximum subarrays. For general K maximum subarrays where overlapping is allowed, Bengtsson and Chen presented time algorithm for one-dimensional case, which finds unsorted subarrays. Our algorithm finds K maximum subarrays in sorted order with improved complexity of O ((n + K) log K). For the two-dimensional case, we introduce two techniques that establish O(n3) and subcubic time.