L563 Backpack V
Given n items with sizenums[i]
which an integer array and all positive numbers. An integertarget
denotes the size of a backpack. Find the number of possible fill the backpack.
Each item may only be used once
Example
Given candidate items[1,2,3,3,7]
and target7
,
return2
每个元素有限,跟背包II比较像,max换成+。
Last updated