Search
⌘K
Get Premium
Leetcode 2809. Minimum Time to Make Array Sum At Most x
Given initial values nums1 and per-second growth rates nums2, every second all nums1[i] increase by nums2[i] and you may then reset one chosen element to 0; find the minimum seconds needed to make the total sum ≤ x (or return -1 if impossible). The core challenge is optimally scheduling which indices to reset over time to counteract linear growth and determine feasibility.
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.