Heyy it is mentioned there that, there is an infinite supply of oranges. Does that mean, we can pick one item multiple times?
Doubt in question statement
heyy please check my code. I want to do this with top down dp. Please suggest the required changes
But a[n-1] represents value not weight weight is represented by ith value as mentioned in the question
@Aparna hey,actually weight array me value represent krrhe hai ,to if we consider current element then remaining weight will be w-element weight which is in array thats why we are doing that.
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.