Have you ever traced or searched on maps for your destination, you might have seen a route for that, in naĂŻve case, A* search is used, because Dijkstra takes more time than it. Each point on the map corresponds to a vertex of a graph and traffic and distances corresponds to edges and weight of it. And to perform both of these algorithms, we take a priority queue sorted by sum of weights or sum of weights and distance remaining. So, in Dijkstra, almost(if sum are smaller than the latter then moved to next vertex) each
vertex is traced to get the ultimate goal. Each vertex is traced from start and sum of the weights is calculated and sorted in ascending order and written to priority queue. Then, doing it recursively, we found the destination, but it traverses through almost all nodes, whenever the queue elements are longer then the path is terminated, so it takes more time. For this reason, we have a extension of Dijkstra, A* search, where sum is equal to weights of the edges and remaining paths. So, here the longest paths are eliminated first, results are quicker. The problem is resolved as the longer distance remaining are eliminated. You can learn more about these online.