Skip to content

Commit 6d002ba

Browse files
authored
Update backpack_vi.py
1 parent 55b3f26 commit 6d002ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

backpack_vi.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
# @param {int[]} nums an integer array and all positive numbers, no duplicates
@@ -17,4 +17,6 @@ def backPackVI(self, nums, target):
1717
for j in xrange(len(nums)):
1818
if i >= nums[j]:
1919
result[i] += result[i - nums[j]]
20-
return result[-1]
20+
return result[-1]
21+
22+
# medium: http://lintcode.com/zh-cn/problem/backpack-vi/

0 commit comments

Comments
 (0)