Using BFS to find the shortest path in a maze from Start to End if there exists one
Make the file with the Makefile provided. To run it in the terminal window: type ./solve < maze.txt where maze.txt is a maze file (Maze files can be generated using the amaze.c file provided).
The first line of a maze file should be the dimensions of the grid—two positive integers, representing the height and width, respectively.
The maze grid is given next. It will consist of an H×W matrix of characters, where
- a space represents an open cell,
- S represents the start cell,
- E represents the end cell, and
- any other character represents a blocked cell.
The .txt files in the repository are example maze files.