Knapsack problem/0-1

FCC link

The 0-1 knapsack problem is defined as follows:

You are given an array of objects representing items to be put in a knapsack. The objects have 3 attributes: name, weight, and value. The items need to be selected so that the total weight does not exceed the maximum weight and the value is maximized.

Test

{{test}}

Console output