Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Limbic Region (3985)

Limbic Region
  (email not shown publicly)
http://gatcomb.org/joshua/perl.html

I love to code perl. If you want to hire me, see details on my homepage.
Wednesday January 12, 2005
01:38 PM

Challenge: Mystery Word Puzzle

[ #22680 ]

See http://www.perlmonks.org/index.pl?node_id=421692 for details. Basically it is one of those things that seems easy to do by hand but not as easy to translate to code. Feel free to reply here or there or not at all ;-)

Cheers
L~R

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I'd use some simple building blocks. sig(word) would return a hash, keyed by letters, counting the number of times that letter occurred in the word. sigintersect( sig1, sig2 ) would take two such signiatures and count the number of overlap letters. Keep an array of hint info: for each hint record the word, the number of total matches, and the sig for that word. To test a word from the dictionary, you first get its sig. Then, for each hint, check whether sigintersect( word sig, hint sig ) equals the hint