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

Method Intersection

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

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

(set2 Set[T])

Source from the content-addressed store, hash-verified

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]
45 // Difference: gives new difference set of both sets.
46 // ex: [1,2,3] Difference [3,4,5] -> [1,2]
47 Difference(set2 Set[T]) Set[T]

Callers 1

TestIntersectionFunction · 0.65

Calls

no outgoing calls

Tested by 1

TestIntersectionFunction · 0.52