#3473
Sum of K Subarrays With Length at Least M
medium · 25.9% accepted · 93 likes · top 4%
array · dynamic programming · prefix sum
Description
You are given an integer array nums and two integers, k and m.
Return the maximum sum of k non-overlapping subarrays of nums, where each subarray has a length of at least m.
Solution