mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2025-01-01 14:19:43 +08:00
.. | ||
__test__ | ||
cartesianProduct.js | ||
README.md |
Cartesian Product
In set theory a Cartesian product is a mathematical operation that returns a set (or product set or simply product) from multiple sets. That is, for sets A and B, the Cartesian product A × B is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B.
Cartesian product AxB
of two sets A={x,y,z}
and B={1,2,3}