Permutations - Perl or just Javascript embedded ?
- From: Telemach <telemach@xxxxxx>
- Date: Thu, 28 Feb 2008 04:19:22 -0800 (PST)
Yesterday I was thinking all day long about what to use for
permutations and still can't figure out a solution. Situation is
this :
I found great small javascript function that does permutations but
this is quite an unusual one.
Every single digit is assigned to 3 or 4 letters so for example
permutations of number 23
could look like this :
ad
ae
af
bd
be
bf
cd
ce
cf
javascipt code is very simple and it looks like too simple to
understand by me (Perl newbie)
because there is no direct loop, just calling a sub from inside this
same sub
I'm having troubles in understanding this code and then rewriting in
Perl so my question is this :
would it be easier to use some javascript module for Perl and paste
javascipt code inside perl script or rewriting this but with help of
permutation modules ?
Problem is that there are 3 or 4 letters per digit and user can input
whatever long number string.
- Telemach -
.
- Follow-Ups:
- Re: Permutations - Perl or just Javascript embedded ?
- From: Joost Diepenmaat
- Re: Permutations - Perl or just Javascript embedded ?
- From: Peter Ludikovsky
- Re: Permutations - Perl or just Javascript embedded ?
- Prev by Date: Re: Magic $a $b
- Next by Date: Re: Permutations - Perl or just Javascript embedded ?
- Previous by thread: Magic $a $b
- Next by thread: Re: Permutations - Perl or just Javascript embedded ?
- Index(es):