News Focus
News Focus
Followers 210
Posts 7903
Boards Moderated 15
Alias Born 05/24/2001

Re: None

Friday, 10/11/2002 12:22:32 AM

Friday, October 11, 2002 12:22:32 AM

Post# of 222454
A lot of people are using the Anagram Solver.

Anyone finding any errors in it yet? The algorithm I used wasn't a specficially "correct" one. More like "very, very likely to be correct and a lot easier than some other ways I could've done it."

PMS Witch, if you're watching, here's the algorithm I used:

1. Grab all words of the same length into a recordset.
2. For each word in that list, make a new list of words containing all of the letters found in the string that was entered.
3. For each word in that smaller list, make a list of all words whose letters all exist in the entered string. (Note: At this point "EERACBM" will return "EMBRACE" and "MACABRE" because every letter in each exists in the other)
4. Add the ASCII values of all the letters in each word in the list and show all the ones that add up the same as the entered string.

It's not a fast performer, but it was easy from the programming viewpoint. I could make it run MUCH faster by adding a field or two to the wordlist table (wordlength and asciisum), but wanted to see what I could do without resorting to that.

I might do that now, though, and see how much faster it'll run if I take advantage of those fields.

Discover What Traders Are Watching

Explore small cap ideas before they hit the headlines.

Join Today