All of my test cases failed in this question apply same logic as knapsack
@rohitkandpal683
Your mistakes :
- It was 0-N knapsack and not 0-1 knapsack.
- the question says The second line contains W space separated integers
- the weight of iβth bag was i+1 and not i, if you start i from 0.
https://ide.codingblocks.com/s/250857