Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3381. Maximum Subarray Sum With Length Divisible by K
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.