Bloomberg interview question

remove duplicate elements in an unsorted array