Khosro Raúl Soleimani

55%
Flag icon
Recap Breadth-first search is used to calculate the shortest path for an unweighted graph. Dijkstra’s algorithm is used to calculate the shortest path for a weighted graph. Dijkstra’s algorithm works when all the weights are positive. If you have negative weights, use the Bellman-Ford algorithm.
Grokking Algorithms: An illustrated guide for programmers and other curious people
Rate this book
Clear rating