Problem: find the route from a given start to a given goal in a rectangular maze. The search goes west, north, east and south sequentially. The output is the maze with the route and all touched grids marked. Size: the maze is 12x12 at most.
The algorithm given is exactly DFS, and we need to mark the trace. The output maze includes a '+' on each grid, no matter there is a wall or not. Note that there is two blank line after "each" output maze, instead of "between" two consecutive mazes. I just wasted TWO HOURS on the last two blank line.
No comments:
Post a Comment