填空题

possible sentences

发布于 2022-03-03 16:46:11

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.

输入描述: s ="catsanddog"
dict ="cat", "cats", "and", "sand", "dog"输入样例: s ="catsanddog" dict ="cat","cats","and","sand","dog" 输出描述: [cats and dog, cat sand dog]输出样例 [cats and dog, cat sand dog]
关注者
0
被浏览
11
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看