Backpack(可否装满)
Given n items with size Ai, an integer m denotes the size of a backpack. How full you can fill this backpack?
Example
Challenge
O(n x m) time and O(m) memory.
O(n x m) memory is also acceptable if you do not know how to optimize memory.
Notice
You can not divide any item into small pieces.
分析
当前解是否可以从前面得到
Last updated