leetcode-139-單詞拆分

題目描述: 方法一:動態規劃 O(n^2) O(n) class Solution: def wordBreak(self, s: str, wordDict: List[str]) -> bool: maxlen=0 for word in wordDict: if len(word)>maxlen:
相關文章
相關標籤/搜索