Question d’entretien chez Anonymous

String with recursion, optimal solution would include dynamic programming or trie.