Available question text
Find the maximum sum of any contiguous subarray whose length is a multiple of k; this reduces to using prefix sums and pairing indices with the same index mod k so you can maximize the difference between a current prefix and the smallest earlier prefix in the same modulo class.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3381. Maximum Subarray Sum With Length Divisible by K
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source