Concepts2
โ๏ธAlgorithmIntermediate
Bellman-Ford Algorithm
BellmanโFord finds single-source shortest paths even when some edge weights are negative.
#bellman-ford#single-source shortest paths#negative weights+12
โ๏ธAlgorithmIntermediate
Dijkstra - Variations and Applications
Dijkstraโs algorithm can be adapted to track the second shortest path by keeping the best and second-best distances per vertex.
#dijkstra#second shortest path#k shortest paths+12