Permutations of characters within a string. What are the possible combinations of arrangement of letters (javascript program)

http://friendpair.50webs.org/permutation.html

I won’t go and describe the approach used.. but I coded from scratch using javascript a permutation generator.

I didn’t analyze the current algorithms for doing this.. but I like my solution..
I’ll admit the working of it was some luck :P as I didnt perfectly understand my solution :D

so far it has limitations of course..
for example future features could be

generating permutations of a certain length etc.

~ by pdna on March 15, 2008.

2 Responses to “Permutations of characters within a string. What are the possible combinations of arrangement of letters (javascript program)”

  1. on a side note.. the for loops were long and unmanageable..thus this approach seemed best.

    i.e. having an array to track combinations and concatenate ..

  2. Nice script. The page layout looks similar to my own JS permutation page. Check it out:
    http://scriptar.com/JavaScript/permute.html

Leave a Reply

You must be logged in to post a comment.