New York Times Interview Question

Remove duplicates from an array