Question d’entretien chez 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".

Réponse à la question d'entretien

Utilisateur anonyme

13 févr. 2018

Use the Trie data structure.