3430. Maximum and Minimum Sums of at Most Size K Subarrays
You are given an integer array
nums
and a positive integerk
. Return the sum of the maximum and minimum elements of all subarrays with at mostk
elements.
c++
1 | class Solution { |