摘要:
https://blog.csdn.net/cetrol_chen/article/details/91129806 阅读全文
摘要:
class Solution: def maxCoins(self, nums: List[int]) -> int: # DP 因为dp[left][right] = argmax(dp[left][i]+dp[i][right]+left*i*right) # 这个遍历顺序就是,先中间,后两边 阅读全文
摘要:
https://leetcode-cn.com/problems/word-break-ii/ class Solution: def wordBreak(self, s: str, wordDict: List[str]) -> List[str]: # 本题就是加上剪枝的回溯算法 # recor 阅读全文