Add cartesian product algorithm.

This commit is contained in:
Oleksii Trekhleb 2018-04-02 09:05:17 +03:00
parent 2f329b012a
commit 02806f7efa
2 changed files with 3 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -5,4 +5,6 @@ In set theory a Cartesian product is a mathematical operation that returns a set
the Cartesian product A × B is the set of all ordered pairs (a, b) the Cartesian product A × B is the set of all ordered pairs (a, b)
where a ∈ A and b ∈ B. where a ∈ A and b ∈ B.
![Cartesian Product of Two Sets](https://en.wikipedia.org/wiki/Cartesian_product#/media/File:Cartesian_Product_qtl1.svg) ![Cartesian Product of Two Sets](https://github.com/trekhleb/javascript-algorithms/blob/master/assets/cartesian-product.png)
Image from [Wikipedia](https://en.wikipedia.org/wiki/Cartesian_product)