code_junkie

Running time of set union operation

Nov 12th, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. a = set((1, 2, 3))
  2. b = set((2, 3, 5))
  3. union = set()
  4. for el in a:
  5. union.add(el)
  6.  
  7. for el in b:
  8. union.add(el)
Add Comment
Please, Sign In to add comment