Google interview question

Return array without duplicates (consider space complexity)