CS-285
Lab 4
Word Puzzle
Date: Wednesday,
January 23, 2002
Due: Wednesday, February 13, 2002
The purpose of this program is to use the spell checker that was written for the last assignment to implement a word puzzle program. A word puzzle is one in which valid words are in a linear sequence within a block of characters. For instance,
![]()
|
T |
|
Z |
F |
|
|
R |
U |
T |
|
P |
A |
A |
G |
|
C |
B |
H |
C |
Notice that the words are in straight-line sequences (similar to the way a Queen can move on a chess board). There is no wrap-around of characters off the edges of the puzzle. The alphabetized word output from searching the puzzle would be:
BARK
CART
RUT
The assignment is to write a program that can:
Demonstrate the effectiveness and efficiency of your program on puzzles of size 4, 8, 12, and 16 cells square. Make sure to use new data structures and algorithms (as you learn about them) in your final implementation. When all the projects are finished, we’ll have a friendly competition to see which group’s solution is the best.
Notes:
Don’t worry about substrings that are themselves words. For instance, then and theater both contain the word ‘the’ as a prefix. Just match the longest sequence of characters that forms a word.