Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    If your grid was far bigger you'd have a problem using Dijkstra's algorithm. That is, dijkstra (and BFS) both "flood" the graph from the start. They often explore nodes very far from the optimal path. The alternative is to use A* which is similar to dijkstra but also uses a heuristic to help focus on nodes that are likely to be close to the destination.
    – Tom Leys
    Commented Sep 2, 2016 at 1:24
  • This video also explains a calculation example nicely.
    – J0ANMM
    Commented Jan 26, 2017 at 18:17