Pergunta de entrevista da empresa Marchex

Write code to find the first repeated digit in a string, and explain the efficiency of your code.