Adobe Interview Question

to remove the duplicates from the set