Adobe interview question

to remove the duplicates from the set