Problem

A maze is to be represented by a 12 × 12 array composed of three values: open (O), wall...

A maze is to be represented by a 12 × 12 array composed of three values: open (O), wall (W), or exit (E). There is one exit from the maze. Write a program to determine whether it is possible to exit the maze from each possible starting point (any open square can be a starting point). You may move vertically or horizontally to any adjacent open square. You may not move to a square containing a wall. The input consists of a series of 12 lines of 12 characters (O, W, or E) each, representing the contents of each square in the maze. Your program should check that there is only one exit. As the data are entered, the program should make a list of all of the starting point coordinates. It can then run through this list, solving the maze for each starting point.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT