Word Break — All Sentences
Asked at Amazon · Coding Questions · Difficulty: Medium
Given a string `s` and a list of words `word_dict`, insert spaces into `s` to form sentences where every word is in `word_dict` (words may be reused). Return all possible sentences.
Loading the problem…