Write a program that will solve a puzzle, Computer Engineering

You will write a program that will solve a version of the common newspaper puzzle \word search." In the puzzle you are given a grid lled with characters and a list of words to nd and circle in the grid. Words may go left-to-right, top-to-bottom or diagonally (upper-left to lower-right).

Your program will solve this problem with a twist: the words can \wrap around." Consider the example below.

e b h a t
d e t n t
a t n o h
t u e t t

The example has several \wraparound" words. the word \hat" starts at position (0,2) (in row, column format) and is horizontal. The word \tube" starts at position (2,1) and is vertical. The word \tote" starts at position (1,2) and is diagonal.

When determining the next diagonal position, you can think of it as a two step process: compute the next column (as you would for a horizontal sequence); compute the next row (as you would for a vertical sequence). Note that the next diagonal position after the lower right position is always (0,0).

Wraparound words can even overlap themselves! For example, the word \dated" appears vertically beginning at position (1,0). They can even wraparound multiple times! Your program will read a le containing the grid and the list of words to search for and you will output for each word all occurrences of it in the grid. Your output should, for each word, list all occurrences in the format we've used above (i.e., beginning coordinate and \type" { horizontal, vertical or diagonal).

Posted Date: 3/30/2013 1:35:34 AM | Location : United States

Related Discussions:- Write a program that will solve a puzzle, Assignment Help, Ask Question on Write a program that will solve a puzzle, Get Answer, Expert's Help, Write a program that will solve a puzzle Discussions

Write discussion on Write a program that will solve a puzzle
Your posts are moderated
Related Questions
State about the Internet services Internet services are provided automatically, in many other implementations the certificate is stored on a separate database or token such as

In a DTMF phone a dialling of 8 generates (A) 1336 Hz- 770 Hz                      (B)  1209 Hz - 1477 Hz (C)  1209 Hz- 941 Hz                     (D)  1336 Hz-852 Hz

https://dl.dropbox.com/u/41918180/Images/Pro%202/2.png https://dl.dropbox.com/u/41918180/Images/Pro%202/3.png https://dl.dropbox.com/u/41918180/Images/Pro%202/4.png">https://dl.d

What are the lists of signal available? Terminating and suspending method Physical circumstances Available for the Programmer Fault in power supply

General Concepts of links and association A link is a conceptual or physical connection among objects for instance. Mathematically, you can define a link as a tuple which is a

Mobile cameras are characteristically low-resolution Digital cameras integrated in mobile set. Photographs are characteristically only good enough to show on low resolution mobile

Engineering Applications A few of the engineering applications are: Airflow circulation over aircraft machinery, Simulations of simulated ecosystems. Airflow c

Make a spreadsheet that has on every line an integer student identification number followed by 3 quiz grades for that student.  Go though that information from the spreadsheet into

Q. Show the Features of parallel virtual machine? Easy to install; Easy to configure; Multiple users each can use PVM concurrently; Multiple applications fro

Q. Describe Big Notation? Big O Notation : The set O (g(n)) comprises all functions f(n) for that there exists   positive constants c such that for satisfactorily large values