You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given Input : an array of weights wt[], an array of values val[] containing weights and values for each item and a Weight W of Knapsack.
Output : Maximise the profit.
here we are allowed to use unlimited number of instances of an item unlike 0-1 Knapsack problem.
Test Case:
input- wt={1,2,3,4}
val={25,35,10,25}, W=8
Output- 200