Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2902. Count of Sub-Multisets With Bounded Sum
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source