Write an algorithm to solve word ladders such as
Word Meld 1 or
Word Meld 2. Input consists of the
starting and ending words and the maximum number of steps allowed. Available are files containing lists of
words of any given length; call one such file, say WORDS5.TXT containing a list of words of 5 letters each, and so on.
One useful footnote that we discovered setting this problem was that it is considerably faster to generate the 25N 'adjacent' words (for an N-letter word) and then eliminate all the non-words in this list than it was to search the N-letter word list for words with a single letter difference.
|
Posted by Bruce
on 2003-09-26 09:56:59 |