Problem #PRU-66520

Problems Mathematical logic

Problem

A labyrinth was drawn on a \(5\times 5\) grid square with an outer wall and an exit one cell wide, as well as with inner walls running along the grid lines. In the picture, we have hidden all the inner walls from you (We give you several copies to facilitate drawing) imageimageimage
Please draw how the walls were arranged. Keep in mind that the numbers in the cells represent the smallest number of steps needed to exit the maze, starting from that cell. A step can be taken to any adjacent cell vertically or horizontally, but not diagonally (and only if there is no wall between them, of course).