Question not clear

in que it is given there are infinite oranges available in market so it should be a variation of 0/n knapsack problem, but in hint video it is given its a variation of 0/1 knapsack problem. Please explain it

https://ide.codingblocks.com/s/312729 I used this variation of 0/n knapsack and the code is working

Hey @Akshita99, the problem is actually based on unbounded knapsack(repeated elements allowed).
By variation of 0/1 knapsack it means, the element can be taken more than once.
For better understanding, you can also refer to this code.
Hope this helps