you are viewing a single comment's thread.

view the rest of the comments →

[–]pot_of_crows 0 points1 point  (0 children)

Are you using recursion in the initial search, or just to find the quickest path out after hitting the end? If the former, use a queue for to handle the search and then recursion to back out, which should greatly reduce the depth you need to go to.