Leetcode 2952. Minimum Number of Coins to be Added
Given coin values and a target, find the minimum number of extra coins to add so every integer in [1, target] can be formed as a subsequence (subset) sum. The core challenge is a greedy interval-covering: sort coins and maintain the maximum reachable prefix, adding the smallest missing value when a gap appears until the prefix reaches target.
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.