Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3430. Maximum and Minimum Sums of at Most Size K Subarrays
Compute the total sum of the minimum plus maximum element for every subarray of nums with length at most k. The challenge is to do this efficiently (near-linear time) for n up to 80,000 rather than enumerating all subarrays.
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.