Word Break II
Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences in any order.
Word Break II

Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences in any order.

Example 1:
Input: {"s":"catsanddog","wordDict":["cat","cats","and","sand","dog"]}
Output: ["cats and dog","cat sand dog"]
Input
arr ={"s":"catsanddog","wordDict":["cat","cats","and","sand","dog"]}

Breaking "catsanddog" using dictionary: [cat, cats, and, sand, dog]

Input String

c

0

a

1

t

2

s

3

a

4

n

5

d

6

d

7

o

8

g

9
Dictionary
cat
cats
and
sand
dog
Found Sentences (0)

No sentences found yet...

Position: 0
Found: 0
Variables
No variables to display
DepthFunction Call
Stack empty
0/9