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:
相关文章
相关标签/搜索