HF RL Explorer

Cartesian Product of JavaScript Arrays

Cartesian Product of JavaScript Arrays: a task in Terminal-Lego-15k (Harbor dataset). Implement a JavaScript function that computes the Cartesian product of N arrays of variable lengths. The Cartesian product generates all possible combinations by taking one element from each array.

The task

Implement a JavaScript function that computes the Cartesian product of N arrays of variable lengths. The Cartesian product generates all possible combinations by taking one element from each array.

Part of PrimeIntellect/Terminal-Lego-15k.