Skip to content

Commit

Permalink
Merge pull request #9 from i-vishi/master
Browse files Browse the repository at this point in the history
updated python folder
  • Loading branch information
i-vishi authored Oct 1, 2018
2 parents 2da2825 + b566126 commit 4693d9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 0-1_Knapsack_problem/knapsack.py → PYTHON/knapsack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
print knapSack(W , wt , val , n)

0 comments on commit 4693d9d

Please sign in to comment.