#3473
Sum of K Subarrays With Length at Least M
expert · 1160 · lc medium +32 · 25.9% accepted · 93 likes · top 4%
Description
Given integer array nums and integers k and m, select exactly k non-overlapping subarrays from nums, each of length at least m, to maximize their combined sum.
Return that maximum sum.
Code
1
2
3