Pergunta de entrevista da empresa Curriculum Associates

Given an array, get all of duplicate elements in the array.