Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3462. Maximum Sum With at Most K Elements
Pick up to k elements from an n×m matrix to maximize their total value, with the extra constraint that you may take at most limits[i] elements from row i. The core algorithmic pattern is converting each row into choices of taking t top elements (prefix sums) and solving a multiple-choice/0-1 knapsack over capacity k to combine rows optimally.
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.