Word Break II

Given a string s and a list of dictionary words, return every sentence that can be formed by splitting s into dictionary words. Each word of the sentence must be in the dictionary, one space separates adjacent words, and the concatenation of the words must reproduce s exactly. A dictionary word may be used more than once. Return an empty list when no complete split exists.

Every distinct split must appear exactly once. The order of the returned sentences does not change which sentences are correct.

Examples
Input: ["catsanddog",["cat","cats","and","sand","dog"]]
Output: ["cat sand dog","cats and dog"]
Hints

Word Break II

Given a string `s` and a list of dictionary words, return every sentence that can be formed by splitting `s` into dictionary words. Each word of the sentence must be in the dictionary, one space separates adjacent words, and the concatenation of the words must reproduce `s` exactly. A dictionary word may be used more than once. Return an empty list when no complete split exists.