Pergunta de entrevista da empresa Microsoft

Find a duplicate number in an array of size n.(elements will be 1...n)