Pergunta de entrevista da empresa MITRE

Find the first duplicated character in a string.