How is Dijkstra algorithm better tham A* algorithm for finding shortest path?
It is not better at finding the shortest path. As long as you have an admissible heuristic for A* it will find the shorted path quicker than Dijkstra's would.
And as Mehrad pointed out in the comments, A* degrades into Dijktras if you give it a heuristic function that returns 0.
The wikipedia article for A* has a ton of good information on all of this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With