Amadeus interview question

remove duplicate from an array