Maze type doubt

can i get a solution to this question

hi @rohit_1906 since you have to find the shortest path, you can easily do a graph traversal and find the shortest path to exit from every node.