Exercise 4


In this exercise you will write code to solve the familiar WordSearch puzzle. We saw one of these in the supplement to Module 2:

     n o h t y p s
     m i a r y c c
     l l e k s a h
     r u b y v m e
     e h h a l l m
     p c j n i c e
     r e e k b i p
     
Here, you see the words "ruby" and "java" appear in the puzzle. Whereas the code shown in the Module-2 supplement only looks for words (like "ruby" above) that read left to right horizontally, the general WordSearch puzzle also allows: Thus, you will write code to search for a given set of words in a general puzzle and print out their positions.

To get started:

Things to note:

Submission:

What else is due: