Leo Lei | 雷雨
Sep 09, 2018
Word Break cont.
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
Note:
- The same word in the dictionary may be reused multiple times in the segmentation.
- You may assume the dictionary does not contain duplicate words.
Example 1:
Input: s = "abcdefg", wordDict = ["abc", "de", "fg", "d", "efg]
Output: true
Explanation: Return true because "abcdefg" can be segmented as "abc de fg"
or "abc d efg".
Example 2:
Input: s = "applepenapple", wordDict = ["apple", "pen"]
Output: true
Explanation: Return true because "applepenapple" can be segmented as "apple pen apple".
Note that you are allowed to reuse a dictionary word.
BFS
TODO
核心开发人员深入浅出的讲解了Kubernetes的起源、背后的技术以及使用细节。
None