diff --git a/Knapsack Problem b/Knapsack Problem index 1b55d6e..f745959 100644 --- a/Knapsack Problem +++ b/Knapsack Problem @@ -1,5 +1,9 @@ #! usr/bin/env python +#Given a set of items, each with a weight and a value +#determine the number of each item to include in a collection +#so that the total weight is less than or equal to a given limit and the total value is as large as possible. + l = [[4000, 20], [3500, 10], [1800, 9], [1000, 4], [400, 2], [200, 1]] n = len(l) m = []