I have m sets, which can be stored using array, or arraylist. There are overlaps among these sets. I would like to combine these m sets into a single set, and those duplicate elements will only occupy one spot in the combined set. Which kind of data structure and operation should I use to construct the combined set.
Share
This code will do it for you:
setnow contains all unique values once each