Get all possible word combinations

后端 未结 2 875
无人共我
无人共我 2020-12-06 23:02

I have a list of n words (let\'s say 26). Now I want to get a list of all possible combinations, but with a maximum of k words per row (let\'s say 5)

So when my word

2条回答
  •  星月不相逢
    2020-12-06 23:40

    You could take a look at this

    However, if you need to get large numbers of combinations (in the tens of millions) you should use lazy evaluation for the generation of the combinations.

提交回复
热议问题