Pregunta de entrevista de Amazon

The second question was based on dictionary and string.

Respuesta de la entrevista

Anónimo

19 de may de 2019

I was able to solve this entirely in an unoptimized way, which I got to know at the last moment. Maybe an optimized way would have got me a 100% score.