Finding all maze solutions with Python
问题 I am trying to find (using Python) all possible solutions to a maze. I have a DFS script that returns one solution. I am trying to adapt it but I'm really having a hard time wrapping my head around the whole recursion thing. Here's the code I have, which works for finding one possible solution using DFS: Any tips or help would be much appreciated! (The "lett" in the array can be ignored/considered regular "path") def DFS(x,y,Map): if (Map[x][y]=="exit"): #check if we're at the exit return [(x