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

Light Poster
5Feb2008,16:03   #1
gopal_787's Avatar
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
Ambitious contributor
5Feb2008,22:16   #2
oogabooga's Avatar
You are looking for a permutation algorithm.
Light Poster
6Feb2008,16:43   #3
gopal_787's Avatar
Thanks a lot for that.. The first link that comes up gives a good explanation of it.. served the purpose.. Thanks