0689. Maximum Sum of 3 Non-Overlapping Subarrays
Description
**Input:** nums = [1,2,1,2,6,7,5,1], k = 2
**Output:** [0,3,5]
**Explanation:** Subarrays [1, 2], [2, 6], [7, 5] correspond to the starting indices [0, 3, 5].
We could have also taken [2, 1], but an answer of [1, 3, 5] would be lexicographically larger.**Input:** nums = [1,2,1,2,1,2,1,2,1], k = 2
**Output:** [0,2,4]ac
ac2:
Last updated