摘要: 给定一个容量为c的背包,以及一组物品,每个物品的重量及价值分别存放在一个数组中:weights[0...n],values[0...n] 求得将物品放入背包后的最大价值是多少? Code:自底向上 Code:自顶向下 阅读全文
posted @ 2017-07-30 18:45 Realvie 阅读(230) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2017-07-30 11:09 Realvie 阅读(113) 评论(0) 推荐(0) 编辑