Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
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