Premium problem90. Cartesian Product

Hard Locked

Given a list of vectors arrays, build the cartesian product (every combination of one element from each) as a 2-D array.

Input

[[1, 2, 3], [4, 5], [6, 7]]

Output

[[1 4 6]
 [1 4 7]
 [1 5 6]
 [1 5 7]
 [2 4 6]
 [2 4 7]
 [2 5 6]
 [2 5 7]
 [3 4 6]
 [3 4 7]
 [3 5 6]
 [3 5 7]]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)