Given a sequence of number which can be positive and negative, there are several algorithms to find the longest increasing subsequence. But can someone give me an algorithm to find the longest increasing subsequence with the maximum sum if there are multiple longest increasing subsequences?
Example: For 20, 1, 4, 3, 10, the answer is 1, 4, 10, not 1, 3, 10
1 Answer