Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2902. Count of Sub-Multisets With Bounded Sum
Count the number of sub-multisets (you may take each value 0..occurrence times) whose element sum lies in [l, r], returning the result modulo 1e9+7. Algorithmically this is a bounded subset-sum/counting problem (bounded knapsack) with total sum ≤ 2·10^4, making DP or generating-function techniques appropriate.
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.