Given a list of substrings and an input string, determine whether the input string can be composed using the substrings. e.g. Given "a", "man", "break", determine if "amanabreak" can be decomposed. Answer: Yes: "a" "man" "a" "break".
Anónimo
Use the Trie data structure.