Leetcode 3489. Zero Array Transformation IV
Find the smallest prefix length k such that for every index i, nums[i] can be formed as the sum of some subset of the values val_j from the first k queries whose ranges include i. In other words, it's a per-index subset-sum feasibility problem over the multiset of query values that cover each position, and you must return the minimum k (or -1) for which all positions are attainable.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.