Represents an intersection set operation, which are the elements that exist in both set A and set B.
A ∩ B = {x: x ∈ A & x ∈ B}
O(n * m)
n = |B|
m = |A|
Set<TElement>
Set A of type <TElement> elements
<TElement>
Set B of type <B> elements
<B>
Intersection of A and B
Set.prototype.intersection
// {1, 2, 3, 4} ∩ {3, 4, 5, 6} = {3, 4}getIntersection(new Set([1, 2, 3, 4]), new Set([3, 4, 5, 6])); // new Set([3, 4]) Copy
// {1, 2, 3, 4} ∩ {3, 4, 5, 6} = {3, 4}getIntersection(new Set([1, 2, 3, 4]), new Set([3, 4, 5, 6])); // new Set([3, 4])
Generated using TypeDoc
Represents an intersection set operation, which are the elements that exist in both set A and set B.
A ∩ B = {x: x ∈ A & x ∈ B}
O(n * m)
, wheren = |B|
(size of set B) andm = |A|
(size of set A).Set<TElement>
instance.