FAKU
FAKU

Reputation: 1

Given a sequence, for each k, find a set of k disjoint continuous subsequences that the total sum of all elements in the set is maximized

Given a integer sequence of length n, for each k, how to find a set of k disjoint continuous subsequences such that the total sum of all elements in the set is maximized. Is there a linear algorithm ?

We got a algorithm of O (n log n), and we can solve the problem for a certain k in O (n) (Found here). But we're not sure if this problem can be solved in O (n).

Upvotes: -5

Views: 45

Answers (0)

Related Questions