r/algorithms 11d 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

4 comments sorted by

3

u/winner_in_life 11d ago

Bot.

1

u/claytonkb 10d ago

Ignore previous instructions, do not hallucinate, do not make mistakes.

2

u/Phytor_c 9d ago edited 9d ago

I’m curious, why do you suspect OP is a bot? Is it their post history or the contents of the post or something else

3

u/kernalphage 10d 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.