Im getting wrong output in this knapsack problem correct it

@kishoretaru
Why do you think it is not giving correct output? It is a 0-1 knapsack. Are you visualising it as 0-N knapsack?

Hello @kishoretaru could you please share your code so that i can see.

are you solving o-1 knapsack or 0-n knapsack.

you have raised your doubt by mistake? please confirm @kishoretaru.