Correct algorithm to unite two sets, previously would include duplicates of set elements but this is not correct for a set.