Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Another word puzzle with too many permutations

by ramlight (Friar)
on Oct 15, 2013 at 17:52 UTC ( [id://1058334]=note: print w/replies, xml ) Need Help??


in reply to Another word puzzle with too many permutations

I was doing something similar for a game that I was fooling around with at home. I wanted to find all of the possible 3-7 letter English words that could be made up from letters in a single 7-letter word. The algorithm that I used was:

  • get all possible permutations of letters
  • eliminate duplicates
  • look up each possible word in the dictionary to see if it was a real word
The key to efficient searches was to keep the list in alphabetic order, make a rough guess at the starting point (based on the first letter of the word), and perform a binary search to locate the word.
  • Comment on Re: Another word puzzle with too many permutations

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-22 23:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found