Pregunta de entrevista de Ritual

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".

Respuesta de la entrevista

Anónimo

13 feb 2018

Use the Trie data structure.