MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / Union

Method Union

structure/set/set.go:41–41  ·  view source on GitHub ↗

Union: gives new union set of both sets. ex: [1,2,3] union [3,4,5] -> [1,2,3,4,5]

(set2 Set[T])

Source from the content-addressed store, hash-verified

39 // Union: gives new union set of both sets.
40 // ex: [1,2,3] union [3,4,5] -> [1,2,3,4,5]
41 Union(set2 Set[T]) Set[T]
42 // Intersection: gives new intersection set of both sets.
43 // ex: [1,2,3] Intersection [3,4,5] -> [3]
44 Intersection(set2 Set[T]) Set[T]

Callers 1

TestUnionFunction · 0.65

Calls

no outgoing calls

Tested by 1

TestUnionFunction · 0.52