Given weights and values of n items and a knapsack capacity W, find the maximum value you can put in the knapsack.
Input: weights=[1,3,4,5], values=[1,4,5,7], W=7 Output: 9 (items 2+3 with weight 3+4=7)
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features