Whats the error?

reply to this please

its been a day…reply please

pleaase replyyyyyyyyy

Hey you have taken dp[0][i] to be 0 for all i from 1 to W which is wrong. If n==0 and w is non - zero then it is not possible to get w kg orange and hence it should be int max. Please change that.

i have done that…now it is giving min value only as output plz check