Data-Structures-Algorithms-Problems
Data-Structures-Algorithms-Problems copied to clipboard
Solve the knapsack problem
You are presented with a set of N items, each with its own weight and profit. Additionally, you have a bag with a limited capacity of W, meaning it can only hold items with a total weight not exceeding W. The objective is to strategically select items to place in the bag in order to maximize the total profit derived from those items.
Hint: understand Knapsack problem Follow contributing guidelines in a proposed PR.