Wayfair Interview Question

Given a two-dimensional array of strings, return all possible combination of words. Example: ['grey','black'] ['fox','dog'] ['jumped','ran','growled'] Return: grey fox jumped grey fox ran grey fox growled black fox jumped ... black dog growled

Interview Answer

Anonymous

Aug 26, 2016

cartesian product