Here is a simple program which demonstrates how to scan words in a dictionary.
It solves a recent CarTalk puzzler:
There is only one word in the English language which
contains 3 consecutive
sets of double letters. What is the word?
This program contains about 35 lines of user written code and took about 15
minutes to write in Delphi. (Not including the few hours it is taking to
document and publish the code :>).
The program uses our TDict dictionary class to search for the word in our
50,000 word dictionary (Full,dic). In fact, it lists all words with 3
sets of double letters and flags the one where the 3 sets are all adjacent.
For simplicity, I have included both the UDict file containing the
TDict class and the dictionary in the source code zip file below. I
have also included an executable zip download with the dictionary for
non-programmers who are just curious about the word. Programmer's
looking for more extensive samples should visit
Wordstuff page for additional programs, dictionaries, and information about
downloading UDict as contained in our DFF library file.
| Created: July 2, 2007 |
Modified: November 07, 2008 |