Is there a reverse knapsack solution?

Is there any code or related problems to reverse knapsack. (i.e) value should be minimum and the weight should not be less than the given weight.

Consider the following problem statement,

Problem Statement:
Sara has two types of apples that have some sweetness level. She has N apples of the first type which costs her P rupees each and M apples of the second type which costs her Q rupees each. She wants to pick apples in such a way that the total sum of sweetness level is equal to or more than X and the total cost is minimum.
Print the minimum cost required if it is possible to make total sweetness more than X else print -1.

Input: N=5, M=5, Type1Sweetness = [1,2,3,4,5], type2Sweetness=[3,2,1,8,7], P=1, Q=2;

Here I have considered sweetness array as weight, created corresponding price array and filled respective values. Then all I can think of is, it is somewhat similar to reverse knapsack problem. Is there any other possible way i can think of a solution for this problem? Any clue or idea would be helpful :)

Even tried Binary search approach, still couldn't succeed. :(

Comments (2)