Hey guys, so am working on this knapsack problem but i don't get the max profit correct. I run the code on this input:
4
16
1 40 2
2 30 5
3 50 10
4 10 5

The answer should be 90 however I get...