Concepts18
Johnson's Algorithm
Johnson's Algorithm computes all-pairs shortest paths on sparse graphs by first removing negative edges via reweighting, then running Dijkstra from every vertex.
Bellman-Ford Algorithm
BellmanโFord finds single-source shortest paths even when some edge weights are negative.
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.
Topological Sort - DP on DAG
Topological sort orders vertices of a directed acyclic graph (DAG) so every edge goes from earlier to later, which is perfect for dynamic programming (DP).
Topological Sort
Topological sort orders the nodes of a directed acyclic graph (DAG) so every edge points from left to right in the order.
Multi-Source BFS
Multi-source BFS explores an unweighted graph starting from several sources at once to compute the minimum distance to any source for every vertex.