Apexon interview question

Remove the duplicate elements in array