Question d’entretien chez Amazon

How would you replace duplicate values in an unsorted array?