The graph is another structure that can be used to solve the maze problem (see Project 24 in Chapter 3). Every start point, dead end, goal, and decision point can be represented by a node. The arcs between the nodes represent one possible path through the maze. A graph maze is shown in Figure 11-27.
Write a program that simulates a mouse’s movement through the maze, using a graph and a depth-first traversal. When the program is complete, print the path through the maze.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here