Pergunta de entrevista da empresa ScaleXP

Create a dictionary of different words in a string and count their occurrence.