Pregunta de entrevista de Paycom

Iterate through a string and find duplicates in the string