Pergunta de entrevista da empresa Microsoft

Given an array of size n with values within a known range, write a method to find duplicates in O(1)