Question: 1 Finding the shortest path in a maze This is a programming assignment to test your understanding of Stacks or Queues A maze is given

1 Finding the shortest path in a maze This is a programming assignment to test your understanding of Stacks or Queues A maze is given as n m character matrix of squares where there exist the starting point s and the ending point e. Given a maze, your goal is to find a path from s to e on the maze with the minimum length of the path. A path consists of squares which are horizontally or vertically adjacent. . In the matrix representing a maze, "*" squares are blocked squares while "0" squares are available to explore the maze. Interestingly, there are k warp zone locations that allow you an instant travel be- tween those locations. That is, when you move in a warp zone location, you can instantly move to any warp zone without any cost. Surely, you cannot use the warp zone if vou don't want it. In our matrix. "w" squares represent warp zone locations You will write a code in the C programming language to find a path from s to e on the maze with the minimum length of the path from a given n x m matrix to represent a maze in the input file named hw2-input.txt'. Please write (1) the length of the path satisfying the above requirements and (2) the path itself, respectively, into the output file named 'hw2 output.txt' The followings are examples of input and output files [Input file: hw2_input .txt] 0 *0 [Output file: hw2_output . txt] 3 1 Finding the shortest path in a maze This is a programming assignment to test your understanding of Stacks or Queues A maze is given as n m character matrix of squares where there exist the starting point s and the ending point e. Given a maze, your goal is to find a path from s to e on the maze with the minimum length of the path. A path consists of squares which are horizontally or vertically adjacent. . In the matrix representing a maze, "*" squares are blocked squares while "0" squares are available to explore the maze. Interestingly, there are k warp zone locations that allow you an instant travel be- tween those locations. That is, when you move in a warp zone location, you can instantly move to any warp zone without any cost. Surely, you cannot use the warp zone if vou don't want it. In our matrix. "w" squares represent warp zone locations You will write a code in the C programming language to find a path from s to e on the maze with the minimum length of the path from a given n x m matrix to represent a maze in the input file named hw2-input.txt'. Please write (1) the length of the path satisfying the above requirements and (2) the path itself, respectively, into the output file named 'hw2 output.txt' The followings are examples of input and output files [Input file: hw2_input .txt] 0 *0 [Output file: hw2_output . txt] 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
