Suppose I have an array called arMain:
Dim arMain(1000) as String
and each element contains one character:
arMain(0)="a"
arMain(1)="b"
arMain(2)="c"
arMain(3)="d"
...etc...
I want to concatenate the elements to get, firstly strings of length one, then two etc. With the above letters I would get:
a
b
c
d
aa
ab
ac
ad
ba
bb
bc
bd
ca
cb
cc
cd
da
db
dc
dd
abc
abd
acb
acd
adb
adc
...etc...
An algorithm please?




Reply With Quote