Improved Algorithms for the K-Maximum Subarray Problem
Department of Computer Science and Software Engineering, University of Canterbury Christchurch, New Zealand
*Corresponding author: seb43{at}student.canterbury.ac.nz
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.
Key Words: Maximum subarray persistent 2-3 tree selection in matrices with sorted columns distance matrix multiplication