Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2554. Maximum Number of Integers to Choose From a Range I
Given a banned set, n, and maxSum, pick the maximum number of distinct integers from 1..n (excluding banned values) whose total sum does not exceed maxSum. The core challenge is maximizing count under a sum budget — typically solved by greedily taking the smallest allowed numbers.
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.