Pathfinding Algorithms

Dijkstra

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O((V+E) log V)
Avg: O((V+E) log V)
Worst: O((V+E) log V)
Space: O(V)

A*

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(E)
Avg: O(E)
Worst: O(E)
Space: O(V)

BFS

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(V+E)
Avg: O(V+E)
Worst: O(V+E)
Space: O(V)

DFS

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(V+E)
Avg: O(V+E)
Worst: O(V+E)
Space: O(V)

Bellman-Ford

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(VE)
Avg: O(VE)
Worst: O(VE)
Space: O(V)

Floyd-Warshall

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(V³)
Avg: O(V³)
Worst: O(V³)
Space: O(V²)

Greedy Best-First

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(V log V)
Avg: O(V log V)
Worst: O(V log V)
Space: O(V)

Bidirectional Search

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(b^(d/2))
Avg: O(b^(d/2))
Worst: O(b^(d/2))
Space: O(b^(d/2))

Jump Point Search

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(V log V)
Avg: O(V log V)
Worst: O(V log V)
Space: O(V)

Theta*

Speed
60ms
Grid Size
Legend
StartGoalVisitedRelaxedPath
Complexity
Best: O(V log V)
Avg: O(V log V)
Worst: O(V log V)
Space: O(V)