Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: literati cheat / finding words from scrambled letters

by PerlingTheUK (Hermit)
on Nov 20, 2005 at 22:49 UTC ( [id://510304]=note: print w/replies, xml ) Need Help??


in reply to literati cheat / finding words from scrambled letters

In general blochead has probably coded the basics.

I understand the actual request is a complete script execution each time reading the dictionary instead of accessing an existing hash, due to server timeout restrictions. If you still cannot afford the cpu time for reading a complete dictionary file, you might want to generate a lookup table to only access the relevant lines in a sorted dictionary file. So if someone looks for "pear*" you only read the lines containing e. g. "ea" anagrams and do not bother reading the whole file.

If this is still insuffuciently quick for e. g. two letter lookups, you migh log anagrams that cannot be executed and based on this information extend the lookups for those results returning too many letters.


Cheers,
PerlingTheUK
  • Comment on Re: literati cheat / finding words from scrambled letters

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://510304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found