C++ How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (10th Edition)
bartleby

Videos

Textbook Question
Book Icon
Chapter 7, Problem 7.33RE

(Maze Traversal) The grid of hashes (#) and dots (.) in Fig. 7.27 is a two-dimensional built in array representation of a maze. In the two-dimensional built-in array, the hashes represent the- walls of the maze and the dots represent squares in the possible paths through the maze Moves can be made only to a location in the built-in array that contains a dot.
There is a simple algorithm for walking through a maze that guarantees finding the exit assuming that there is an exit). If there is not an exit, you’ll arrive at the starting location again. Place your right hand on the wall to your right and begin walking forward Never remove hand from the wall. If the maze turns to the right, you follow the wall to the right. As long as you do not remove your hand from the wall, eventually you’ll arrive at the exit of the maze. There may be a shorter path than the one you’ve taken, but you are guaranteed to get out of the maze if you follow the algorithm.

Chapter 7, Problem 7.33RE, (Maze Traversal) The grid of hashes (#) and dots (.) in Fig. 7.27 is a two-dimensional built in

Fig 7.27 Two-dimensional built-in array representation of a maze.

Write recursive function mazeTraverse to walk through the maze. The function should receive arguments that include a 12-by-12 built-in array of chars representing the maze and starting location of the maze. As mazeTraverse attempts to locate the exit from the maze, it should place the character X in each square in the path. The function should display the maze after each move, so the user can watch as the maze is solved.

Blurred answer
Students have asked these similar questions
I need help making this EER diagram in Chen Notation.
In Java I have an input in a text file that I can't submit here. So, please use it as input.txt
Perceptual acuity, according to Ram Charan, explains how Ted Turner became the first CEO to recognize the potential of 24-hour news and thereby created CNN. a) True  b) False

Chapter 7 Solutions

C++ How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (10th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
1.1 Arrays in Data Structure | Declaration, Initialization, Memory representation; Author: Jenny's lectures CS/IT NET&JRF;https://www.youtube.com/watch?v=AT14lCXuMKI;License: Standard YouTube License, CC-BY
Definition of Array; Author: Neso Academy;https://www.youtube.com/watch?v=55l-aZ7_F24;License: Standard Youtube License