LIPIcs.CPM.2024.26.pdf
- Filesize: 0.94 MB
- 15 pages
Consider a variant of the maximum-sum segment problem for a sequence X₀ of n real numbers, which asks an arbitrary contiguous subsequence of X_a that maximizes the sum of its elements for any given real number a, where X_a is the sequence obtained by subtracting a from each element in X₀. Although this problem can be solved in O(n) time from scratch for any given X₀ and a, appropriate data structures for X₀ could support efficient queries of the solution for arbitrary a. We propose an O(n log² n)-time, O(n)-space algorithm that takes X₀ as input and outputs such a data structure supporting O(log n)-time queries.
Feedback for Dagstuhl Publishing