Leetcode 330. Patching Array
Given a sorted array of positive integers and a target n, find the minimum number of numbers to add so every value in [1, n] can be formed as a subset sum; the core challenge is a greedy/doubling strategy that tracks the smallest unreachable value and patches to extend the reachable range until it covers [1, n].
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.