Sept. 10, 2015
Study again the back tracking algorithm using recursive solution, rats in maze, a classical problem. Made a few of mistakes through the practice, one is what do you use the dimension array, another one are that "not all return PA" Th returns value ", not so confident this" return false "at the end of the function.
Relive the algorithmic questions that were done two years ago, Rat in Maze, ashamed of himself! Two years ago the practice, without any reference to the page information, there is no algorithm discussion, try to improve. Feel the gap, this exercise, emphasis on the algorithm can be back out. Step-by-step writing to find a few errors. Two-dimensional array is unfamiliar, delayed for more than 10 minutes; In addition, it is, "return false" in the last sentence of the recursive function, first forget. In short, this classic topic, 10 minutes cannot write out; Requires two arrays, boundary condition detection, a little impression.
Here is my favorite blogs about this problem:
1. http://www.geeksforgeeks.org/backttracking-set-2-rat-in-a-maze/
2. http://algorithms.tutorialhorizon.com/backtracking-rat-in-a-maze-puzzle/
3. https://www.cs.bu.edu/teaching/alg/maze/
Julia ' s C # pratice:
Https://github.com/jianminchen/AlgorithmsPractice/blob/master/RatInAMaze_BackTracking.cs
And then, try-to-find more discussion about the problem, came cross blogs to challenge my analysis skills. Search Google, find a very deep Web page, after watching, experience the code, feel a few levels higher than their own level.
Http://blogs.msdn.com/b/mattwar/archive/2005/02/03/366498.aspx
Http://blogs.msdn.com/b/mattwar/archive/2005/02/11/371274.aspx
More code to read and then play:
Http://www.evercrest.com/ext/CheeseAppropriator.cs
and C # Practice:
Https://github.com/jianminchen/AlgorithmsPractice/blob/master/MousingAround.cs
Backtracking Algorithm:rat in Maze