diff --git a/0-1_Knapsack_problem/knapsack.py b/PYTHON/knapsack.py similarity index 82% rename from 0-1_Knapsack_problem/knapsack.py rename to PYTHON/knapsack.py index d7147fc94..09c399f92 100644 --- a/0-1_Knapsack_problem/knapsack.py +++ b/PYTHON/knapsack.py @@ -23,9 +23,9 @@ def knapSack(W , wt , val , n): # end of function knapSack -# To test above function -val = [60, 100, 120] -wt = [10, 20, 30] +# To test above function give inputs +val = [int(x) for x in input().split()] +wt = [int(y) for y in input().split()] W = 50 n = len(val) -print knapSack(W , wt , val , n) \ No newline at end of file +print knapSack(W , wt , val , n)