KPIT Technologies interview question

find duplicate elements in an array