Given n items with ci cost and vi value with target value X, return the number of items such that the cost is minimized while the total value of the items reaches the target X.
To me, this sounds like a variation of a knapsack problem. We want to minimize the cost while still picking enough items to reach the target X, whereas in knapsack we want to reach the highest value while staying under a weight limit. What would be the best way to approach this problem?