RE: all possible letter combinations

2008-02-14 Thread Bobby Hartsfield
Actually, permutation is your friend... and there are tons of code samples and algorithms out there. I'd start here. http://www.google.com/search?hl=en&client=firefox-a&channel=s&rls=org.mozill a%3Aen-US%3Aofficial&hs=mXk&q=permutation+coldfusion&btnG=Search ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfie

Re: all possible letter combinations

2008-02-14 Thread Greg Morphis
Hey that's pretty smooth. I appreciate it!! On Thu, Feb 14, 2008 at 1:27 PM, Jeff Price <[EMAIL PROTECTED]> wrote: > Try this chunk of code. I leave it up to you to add in a remove duplicates > feature. Check cflib.org for some handy functions to do that. > > NOTE: I found it easier to build a l

Re: all possible letter combinations

2008-02-14 Thread Jeff Price
Try this chunk of code. I leave it up to you to add in a remove duplicates feature. Check cflib.org for some handy functions to do that. NOTE: I found it easier to build a list instead of an array simply because I could recurse with ListAppend but if I recurse with ArrayAppend it starts making

Re: all possible letter combinations

2008-02-14 Thread Ben Doom
You could use a database for this. Create >> a table that contains a single column. That column contains a record for >> each letter of the alphabet. Then, do a cartesian join to join that table >> to itself, three other times. Concatenate the fields and you should have >> each combination. >>

Re: all possible letter combinations

2008-02-14 Thread Greg Morphis
e to > itself, three other times. Concatenate the fields and you should have each > combination. > >> > >> That would get the first part without consideration of the second part. > >> > >> m!ke > >> > >> _ > >> >

Re: all possible letter combinations

2008-02-14 Thread Ben Doom
_ >> >> From: Greg Morphis [mailto:[EMAIL PROTECTED] >> Sent: Wed 2/13/2008 4:57 PM >> To: CF-Talk >> Subject: all possible letter combinations >> >> >> >> >> Given a string, e.g. "ABCD" >> >> I need to come u

Re: all possible letter combinations

2008-02-14 Thread Greg Morphis
_ > > From: Greg Morphis [mailto:[EMAIL PROTECTED] > Sent: Wed 2/13/2008 4:57 PM > To: CF-Talk > Subject: all possible letter combinations > > > > > Given a string, e.g. "ABCD" > > I need to come up with all combinations of letters > eg > ABCD >

RE: all possible letter combinations

2008-02-13 Thread Dawson, Michael
each combination. That would get the first part without consideration of the second part. m!ke _ From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Wed 2/13/2008 4:57 PM To: CF-Talk Subject: all possible letter combinations Given a string, e.g. "ABCD" I need to come u

Re: all possible letter combinations

2008-02-13 Thread Greg Morphis
This is what I have so far.. if(len(remainingchars) eq 1) { wordArray[ArrayLen(wordArray)+1] = strbase & mid(remainingchars,1,1); } else { for (j = 1; j lt len(remainingchars); j=j+1) {

Re: all possible letter combinations

2008-02-13 Thread Mark Mandel
What have you got so far? Mark On Feb 14, 2008 10:58 AM, Greg Morphis <[EMAIL PROTECTED]> wrote: > yes, I know that and it's that part that I need help with which is why > I posted here. > Thanks > > On Feb 13, 2008 5:34 PM, Mark Mandel <[EMAIL PROTECTED]> wrote: > > Recursion is your friend ;o)

Re: all possible letter combinations

2008-02-13 Thread Greg Morphis
yes, I know that and it's that part that I need help with which is why I posted here. Thanks On Feb 13, 2008 5:34 PM, Mark Mandel <[EMAIL PROTECTED]> wrote: > Recursion is your friend ;o) > > Mark > > > On Feb 14, 2008 9:57 AM, Greg Morphis <[EMAIL PROTECTED]> wrote: > > Given a string, e.g. "ABCD

Re: all possible letter combinations

2008-02-13 Thread Mark Mandel
Recursion is your friend ;o) Mark On Feb 14, 2008 9:57 AM, Greg Morphis <[EMAIL PROTECTED]> wrote: > Given a string, e.g. "ABCD" > > I need to come up with all combinations of letters > eg > ABCD > ABDC > ACBD > ACDB > > > And exlude strings like '', 'AAAB' unless you pass a string with

all possible letter combinations

2008-02-13 Thread Greg Morphis
Given a string, e.g. "ABCD" I need to come up with all combinations of letters eg ABCD ABDC ACBD ACDB And exlude strings like '', 'AAAB' unless you pass a string with duplicate characters If I pass the string "AAAB" then it'd return: AAAB AABA ABAA BAAA ~