← 返回 meta 的题目列表Mouse Searches Cheese in a Maze
类型:online_judge
Given a maze with a mouse and a cheese, you are provided two methods: isCheese() to determine if the current position is cheese and move() to move to a new position. Use depth-first search (DFS) to design an algorithm that allows the mouse to find the cheese in the maze.
Example
Input
<maze representation and start position>