Rakuten interview question

Remove duplicate elements from an array