// Let miss be the smallest sum in [0,n] that we might be missing. // Meaning we already know we can build all sums in [0,miss). // Then if we have a number num <= miss in the given array, // we can ...
Given a sorted integer array nums and an integer n, add/patch elements to the array such that any number in the range [1, n] inclusive can be formed by the sum of some elements in the array. Return ...