Facebook | Phone Screen | Combination
Anonymous User
1488

Given a two-dimensional array of strings, return all possible combination of words.

Does anyone have solution for this ?

Example:
['grey','black']
['fox','dog']
['jumped','ran','growled']

Return:
grey fox jumped
grey fox ran
grey fox growled
black fox jumped
...
black dog growled

Comments (12)