Algorithm · Uber · Medium
Count Exact-Score Exam Configurations An exam offers types.length categories of questions. Each entry types[i] = [count_i, marks_i] states that up to count_i questions are available in that category, with every such question contributing marks_i points. Determine how many distinct selections of questions produce exactly target points. Return the result modulo 10^9 + 7. Examples Example 1: Input: target = 5, types = [[5,1],[2,2],[1,4]] Output: 4 Explanation: The valid…
Checking your access…