Minimum money needed dp

how is it 0-1 knapsack?? in this we can take any orange more then once …

it is similar to 0-N knapsack actually
yes you can take any orange more than once

but how in hint video he is able to solve it by 0-1 knapsack??

can you send me the link of question from hacker block ?

how to send link??..

Cody went to the market to buy some oranges for his N friends. There he finds orange wrapped in packets, with the price of i^th packet as val[i]. Now he wants to buy exactly W kg oranges, so he wants you to tell him what minimum price he should pay to buy exactly W kg oranges. Weight of i^th packet is i kg. If price of i^th packet is -1 then this packet is not available for sale. The market has infinite supply of orange packets.

yes it is mention in question that The market has infinite supply of orange packets.

but my question is that how he solved by 0-1 knapsack??

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.