28. Word Break
Determine whether s can be segmented into one or more words from wordDict.
範例 1:
輸入: s = "leetcode", wordDict = ["leet","code"] 輸出: true
範例 2:
輸入: s = "catsandog", wordDict = ["cats","dog","sand","and","cat"] 輸出: false
限制條件:
1 <= s.length <= 3001 <= wordDict.length <= 1000