Finding all non-conflicting combinations of values from multiple lists of values

前端 未结 9 1045
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 05:34

I have the following array which contains arrays of values:

$array = array(
    array(\'1\', \'2\'),
    array(\'a\', \'b\', \'c\'),
    array(\'x\', \'y\'),         


        
9条回答
  •  梦谈多话
    2021-01-01 06:16

    probably not the most elegant way, but does the trick (javascript)

    var result = [];
    
    for(i=0;i

提交回复
热议问题