摘要: 0-1 背包问题 第 416 题:分割等和子集; 第 474 题:一和零; 第 494 题:目标和。 组合总和IV 完全背包问题如下: 第 322 题:零钱兑换; 第 518 题:零钱兑换 II。 阅读全文
posted @ 2020-07-20 15:48 _Meditation 阅读(8525) 评论(0) 推荐(2) 编辑
摘要: 901. 股票价格跨度 描述: 思路:单调栈。 class StockSpanner { Stack<Integer> prices, weights; public StockSpanner() { prices = new Stack(); weights = new Stack(); } pu 阅读全文
posted @ 2020-07-20 12:37 _Meditation 阅读(325) 评论(0) 推荐(0) 编辑