Word Break II
Hard📝 Description
Return all possible sentence constructions from dictionary words
Input Format
String s and dictionary wordDict
Output Format
List of possible sentences
Constraints
1 ≤ s.length ≤ 20
🔍 Sample Input
"catsanddog"
["cat","cats","and","sand","dog"]
✅ Sample Output
["cats and dog","cat sand dog"]
Code Editor
Please login to run and submit code.
Results
Suggested Solution
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run