Knapsack problem

knapsackRecursive2() - did it according to the video .
knapsackRecursive3() - tried another approach , but i am not getting the right answer could you look at my code and tell me where i went wrong in knapsackRecursive3().

Hey @shikhar07
just do
(lui == w.length) {
in line 36
also,sorry for the delay

Hi , Thanks it worked

1 Like