r/algorithms • u/reddyituser • 1d ago
Help Anyone out there , explain me knapsack problem
I have my DAA exam tomorrow , explain asap , in a easy wayðŸ˜ðŸ˜ðŸ¥¹
Q: For the given set of items and knapsack capacity = 10 kg, find the optimal solution for
the 0/1 knapsack problem making use of dynamic programming approach
W=(5,4,6,3) and Profits=(10,40,30,50)
0
Upvotes
2
u/kernalphage 8h ago
computer toucher want put many thing in small thing
many thing may no fit.
try big thing first. Big thing have no many places go.
if not all thing fit go back and try a different place for thing.
If find fit, done.
If try all way for thing to fit and still no fit. No fit ever.
3
u/winner_in_life 1d ago
Bot.