0-1 knapsack problem


why is this not giving correct ans for all testcases…plz correct the code and explain …

@S19LPPP0202 just increase the size of dp to dp[1000][1000]
dont forget to mark the doubt resolved if cleared :smiley:

yeah thanks but plz tell me how should i do development along with dsa ?how did u do it??
how to decide bw machine web and android etc??currently in 2 sem…only able to solve max 2 problems in a contest

@S19LPPP0202 its difficult to do both at the same time. for me i did it about 1 month (web development) but for me it was boring so i didnt continue. well if you want to do development choose any one web or app and try it. they are basically just skills but if your cp is good you dont need to unless you have interest
yes contests problem are tough just keep giving them and after contest solve the problem where you get stuck in your case 3rd one if you do regularly you will improve

where to try webd and android from like just basics…

dont know never tried any course just know the topics and started watching random videos about it in youtube (html css js then got bored)

@S19LPPP0202 just make acc on linkedin get friends with the person which has good skills of what you want and ask him

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.