A* and BFS pathfinding
mediumBFS expands in rings; A* aims at the goal; greedy best-first charges at it and gets the answer wrong. Compare expanded-cell counts on the same maze - the heuristic is the only difference.
Best
O(E) with a perfect heuristicWorst O(E log V)Space O(V)Loading the a* and bfs pathfinding engine…