我需要在VB .NET中生成所有的组合(不是排列),我已经搜索过了,所有我找到的都是排列(有些人说是组合,但当我尝试的时候,所有的都是排列)。
我需要的是从字符串数组生成组合:
Dim data_array As String() = {"one", "two", "three", "four", "five", "six"}
我需要的是:
如果我说只有1个长度,它必须返回:
one
two
three
four
five
six
如果我说2 length,它必须returs:
oneone
onetwo
onethree
onefour
... etc ...
twoone
twotwo
twothree
... etc ...
并一直持续到所有组合结束。
如果我说更长的话,也要这样做。
https://stackoverflow.com/questions/9976215
复制相似问题