Algorithms and Data Structures · Senior · Question 3 of 75

How does A* differ from Dijkstra's algorithm?

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.

Further reading

Problem with a question

Algorithms and Data Structures · Senior · question 3

Test yourself

Take the Algorithms and Data Structures · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz