Available question text
Given range queries that can decrement each index in their range by up to val independently, find the smallest prefix length k such that for every index the total available decrement from the first k queries covering that index is at least nums[i] (otherwise return -1). Key challenge: efficiently test prefixes — typically solved by binary searching k and using a difference/prefix-sum array (or segment tree) to accumulate query contributions.
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 3356. Zero Array Transformation II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source