Re: for all you recursion experts--i'm stuck! help!

From: Date: Tue, 15 Aug 2000 18:45:40 +0000
Subject: Re: for all you recursion experts--i'm stuck! help!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11854@lists.php.net to get a copy of this message
If it were prolog things could be much easier, cause it was almost specifically created for that kind of tasks... Anybody knows if prolog extensions are available for PHP? ~Peter ----- Original Message ----- From: Bill Zeller <billzeller@yahoo.com> To: <php-general@lists.php.net> Sent: 15 àâãóñòà 2000 ã. 22:26 Subject: [PHP] for all you recursion experts--i'm stuck! help! > Hey, > > I've been trying to figure out how to loop through a > "box" of letters. For example, if I had something like > this: > > a d b a e t b > q a w e g a w > w b p w a e d > p a w e d g p > d a w w e b a > > It should start at a and loop through every possible > combination until it finds out that it can't be a > word. So in the above example, it should think like > this: > > 1. There are words that begin with a, continue... > 2. 'ad' is a word, add it to array $words[]... > 3. There are words that begin with 'ad', continue... > 4. 'adq' is not a word, do not add it to array > $words... > 5. There are no words that begin with 'adq', go back > to last word (in this case it is 'ad') > > It would then go onto adb, adba, etc. It should loop > through every possible combination the entire puzzle, > checking each letter with every other letter close to > it. > > Any ideas on where to start? > > Best Regards, > Bill Zeller > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Mail - Free email you can access from anywhere! > http://mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#11854) next »