BlackRock interview question

Duplicates of an array