All directions A mazing problem. How to solve the maze problem? Using the information provided in the text, write a comp
Posted: Thu May 05, 2022 12:52 pm
All directions
A mazing problem. How to solve the maze problem?
Using the information provided in the text, write a complete
program to search a maze. Print out the entrance to exit path if
successful.
short maze[MAX_ROW][MAX_COL] = {
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,START_POINT,1,0,0,0,1,1,0,0,0,1,1,1,1,1,1},
{1,1,0,0,0,1,1,0,1,1,1,0,0,1,1,1,1},
{1,0,1,1,0,0,0,0,1,1,1,1,0,0,1,1,1},
{1,1,1,0,1,1,1,1,0,1,1,0,1,1,0,0,1},
{1,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,1},
{1,0,0,1,1,0,1,1,1,0,1,0,0,1,0,1,1},
{1,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1},
{1,0,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1},
{1,1,1,0,0,0,1,1,0,1,1,0,0,0,0,0,1},
{1,0,0,1,1,1,1,1,0,0,0,1,1,1,1,0,1},
{1,0,1,0,0,1,1,1,1,1,0,1,1,1,1,END_POINT,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
} ;
A mazing problem. How to solve the maze problem?
Using the information provided in the text, write a complete
program to search a maze. Print out the entrance to exit path if
successful.
short maze[MAX_ROW][MAX_COL] = {
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,START_POINT,1,0,0,0,1,1,0,0,0,1,1,1,1,1,1},
{1,1,0,0,0,1,1,0,1,1,1,0,0,1,1,1,1},
{1,0,1,1,0,0,0,0,1,1,1,1,0,0,1,1,1},
{1,1,1,0,1,1,1,1,0,1,1,0,1,1,0,0,1},
{1,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,1},
{1,0,0,1,1,0,1,1,1,0,1,0,0,1,0,1,1},
{1,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1},
{1,0,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1},
{1,1,1,0,0,0,1,1,0,1,1,0,0,0,0,0,1},
{1,0,0,1,1,1,1,1,0,0,0,1,1,1,1,0,1},
{1,0,1,0,0,1,1,1,1,1,0,1,1,1,1,END_POINT,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
} ;