Appinventiv interview question

eliminate duplicate elements from array.