We are given an M by N maze and we should find the shortest path to the exit. The natural thing to do would be BFS and find the shortest path. It is stated that we are required