经典指数          
原因
1071
浏览数
0
收藏数
 

Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences. For example, given s ="catsanddog", dict =["cat", "cats", "and", "sand", "dog"]. A solution is["cats and dog", "cat sand dog"].

     举报   纠错  
 
切换
暂时还没有答案,欢迎分享你的解答 . . .
撰写答案
扫描后移动端查看本题
相关题目