Anche un trie potrebbe essere una soluzione plausibile a seconda anche della lunghezza delle stringhe