Word Puzzle

Problem: Given a table of n rows and m column where each table entry has a single letter of the alphabet and a list of words. Do the following:

  1. For each word in the given list, either find a sequence of letters in the table along a diagonal, on a row, or on a column that spells the word or determine that no such sequence exists. Letter sequences may match the word in any direction - left, right, upper left, upper right, lower left, or lower right.
  2. Determine whether removing some word from the list causes the puzzle to be disconnected. By disconnected we mean that by traversing entries connected by words, some word's entries will never be reached.

Use of Applet: To see the default puzzle press the "default" button. The word list consisting of PASCAL, LISP, BASIC, JAVA is shown in the textarea. To see the location of the words in the puzzle click on the "go" button. The words will show up blue except for a word which, when removed, causes disconnection - that word (PASCAL) shows up in red. To change the puzzle, edit the words in the textarea and click on any table entries and type a new character. When finished, click on the "go" button. To create a custom puzzle, enter a number of rows and a number of columns in the textfields at the top, then click on the "custom" button to reveal a blank table of the specified dimensions. Edit the table by clicking on entries and typing a letter. Edit the word list by changing the contents of the textarea.