Content deleted Content added
Artoria2e5 (talk | contribs) Tags: Mobile edit Mobile web edit Advanced mobile edit |
Artoria2e5 (talk | contribs) No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
Line 58:
This is in effect a depth-first search expressed in term of grid points. The omniscient view prevents entering loops by memoization. Here is a sample code in [[Java (programming language)|Java]]:
<syntaxhighlight lang="java">
boolean[][] maze = new
boolean[][] wasHere = new boolean[width][height];
boolean[][] correctPath = new boolean[width][height]; // The solution to the maze
|