Skip to content

Unbounded Knapsack (Dynamic Programming) #1728

@shahzaibahmad3

Description

@shahzaibahmad3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions