Question: Use The stack class to solve a maze like the one in the attached picture. the maze can be designed as 2D array where each

Use The stack class to solve a maze like the one in the attached picture. the maze can be designed as 2D array where each cell is represented by an array element. The array elements are either 0 (blocked) or 1 (you can walk through) You will be given the starting cell coordinates and the finish point as input and the program should print the route the player will take till the end. The maze specification should be read from a file at the beginning of the program. Your program should be able to solve (tested on) multiple mazes. Important note: you can assume the maze structure does not have a cycle. (moving in the maze cannot return you to a previous point). Hint: using stack to solve this assignment every once in while, the maze will have a point where you will make a choice like in point (1,4) above. Your program should choose one of the possible options but keep track of unused options (using the stack) in case that choice it made leads to a dead end. In that case, it can jump back in time and try other options. The implementation platform is up to ( Console, Swing, android, all work). Efforts to make the game look nicer will receive bonus marks. sample maze data file for the maze above is attachedmaze.txt Download maze.txt the file structure is dimensions of the maze (x and y) start point coordinates finish point coordinates maze point values line by line
Sample Maze Data
10 10 0 1 8 9 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 0 0 1 0 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
