Implementation of the superset operation, which checks if set A is a superset of set B. A superset means all elements of set B are elements of A.
A ⊇ B
O(n * m)
n = |A|
m = |B|
Set A of type <TElement> elements
<TElement>
Set B of type <TElement> elements
Whether A ⊇ B is true
Set.prototype.isSupersetOf
// {1, 2, 3} ⊇ {1, 2, 3}isSupersetOf(new Set([1, 2, 3]), new Set([1, 2, 3])) // true Copy
// {1, 2, 3} ⊇ {1, 2, 3}isSupersetOf(new Set([1, 2, 3]), new Set([1, 2, 3])) // true
Generated using TypeDoc
Implementation of the superset operation, which checks if set A is a superset of set B. A superset means all elements of set B are elements of A.
A ⊇ B
O(n * m)
, wheren = |A|
(size of set A), andm = |B|
(set of size B)