Amazon interview question

How would you replace duplicate values in an unsorted array?