VB Script to generate all possible combinations of words for a given set of letters

gopal_787's Avatar, Join Date: Jan 2008
Light Poster
Hi All,

I am new to the world of VB scripting. I am trying to get some help writing a VB script that generates all possible combinations of words from the letters provided.

for ex: Input -> {a,b,c}
expected outpur - > abc
acb
bac
bca
cab
cba

Any help would be great

Cheers
Gopal
0
oogabooga's Avatar
Ambitious contributor
You are looking for a permutation algorithm.
0
gopal_787's Avatar, Join Date: Jan 2008
Light Poster
Thanks a lot for that.. The first link that comes up gives a good explanation of it.. served the purpose.. Thanks