647. 回文子串[https://leetcode.cn/problems/palindromic-substrings/] 算法思想 dp[...
121. 買賣股票的最佳時機[https://leetcode.cn/problems/best-time-to-buy-and-sell-st...
198. 打家劫舍[https://leetcode.cn/problems/house-robber/] 算法思想: 采用動態(tài)規(guī)劃的思想。當前...
139. 單詞拆分[https://leetcode.cn/problems/word-break/] 算法思想: 完全背包中的排列問題雾叭。 dp...
322. 零錢兌換[https://leetcode.cn/problems/coin-change/] 算法思想: 完全背包問題料身,求最少個數(shù),...
完全背包的理論基礎: 因為一個物品可以取多次胰锌,因此遍歷順序和0-1背包不同骗绕。 0-1背包遍歷背包的時候是倒序,這里是順序资昧,允許重復酬土,且物品和背包...
1049. 最后一塊石頭的重量 II[https://leetcode.cn/problems/last-stone-weight-ii/] 算...
0-1背包問題: 有n個物品,價值為v榛搔,重量為w诺凡,裝進容量為c的背包中,問怎么裝使得背包價值最大践惑。 算法思想:動態(tài)規(guī)劃 dp[i][j] 表示從...
343. 整數(shù)拆分 https://leetcode.cn/problems/integer-break/ 算法思想: dp[i] 對i進行拆分...