力扣139. 单词拆分
目录
力扣139. Word Break(单词拆分)
给你一个字符串 s 和一个字符串列表 wordDict 作为字典。如果可以利用字典中出现的一个或多个单词拼接出 s 则返回 true。字典中的单词可以重复使用。
示例 1:

输入:s = "leetcode", wordDict = ["leet","code"]
输出:true
解释:...示例 2:

输入:s = "applepenapple", wordDict = ["apple","pen"]
输出:true提示:
- 1 <= s.length <= 300
- 1 <= wordDict.length <= 1000
- 1 <= wordDict[i].length <= 20