Pergunta de entrevista da empresa Accenture

How do you detect and eliminate all the repeated characters in one string with only using array?