Question: You will be writing a program to find if it is possible to find a way out of a maze. The maze is to be

 You will be writing a program to find if it ispossible to find a way out of a maze. The maze isto be read from a text file, "maze.txt". The format of the

You will be writing a program to find if it is possible to find a way out of a maze. The maze is to be read from a text file, "maze.txt". The format of the text file is fixed: - The first line will contain the dimensions of the mn array, which will be space separated. - This will be followed by m lines each of which contains n characters. - Each character can either be: S denoting the starting point (which may be anywhere in the maze). G to denoting the ending point (where you need to go to reach the end) - denoting the path you can take \# denoting wall (which you cannot traverse) hs you can observe it is possible to reach the end: You are not required to find the path to the end. Only if it is solvable or not. Here are sone helpful hints for you to think about: - If you are at a particular position, explore all possible paths. - But you must make sure you don't visit the same position again so mark it as visited (make it a wall?). - If you encounter ' G ' it is solvable. You are provided a skeleton code. Do not change any of the function headers. You are only allowed to modify the body of the functions marked with TODO. You are allowed to write helper methods as well. -1viaseuvive! teas-ja va

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!