1. Engineering
  2. Computer Science
  3. language c void solvemazevectorltvectorltintgtgt maze int x int y ...

Question: language c void solvemazevectorltvectorltintgtgt maze int x int y ...

Question details

Language: C++

You will use a stack to solve a maze. The input is an array of 1s and Os and the row and column of the destination. 1 means that the block can be used for a path to the destination and 0 means it cannot. The beginning of the path is 0, 0. The output is the series of coordinates (row, column) of the path to the destination. Your code will be checked to ensure that you used a stack. The path can proceed up, down, left or right but not diagonally The main method will read in the input and place it into an array. write the method solveMaze It will pass the array and the destination into a method called solveMaze. You Sample Input1 1 0 1 1 11 1 0 0 1 0 1 2 3 Sample Output 1:

void solveMaze(vector<vector<int>> maze, int x, int y)
{

}

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution