From 4716fb47ceb0de1b91c8d29e0f332ac99781b869 Mon Sep 17 00:00:00 2001 From: inder5522 <56110745+inder5522@users.noreply.github.com> Date: Sat, 17 Oct 2020 17:13:49 +0530 Subject: [PATCH] Update Knapsack Problem --- Knapsack Problem | 4 ++++ 1 file changed, 4 insertions(+) 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 = []