Algorithms and Data Structures · Senior · Question 3 of 75
How does A* differ from Dijkstra's algorithm?
- ✓Correct answer: It adds an estimate of the remaining distance
- 2It searches from the target back to the start
- 3It ignores edge weights and uses BFS order
Explanation
A* orders vertices by g + h: the known cost plus an estimate to the goal, such as straight-line distance on a map. If h never overestimates (admissible), the path is still optimal, and far fewer vertices are explored.