3381. Maximum Subarray Sum With Length Divisible by K
You are given an array of integers
nums
and an integerk
.Return the maximum sum of a non-empty subarray of
nums
, such that the size of the subarray is divisible byk
.A subarray is a contiguous non-empty sequence of elements within an array.
c++
1 | class Solution { |