Groups
Category
Level
SPFA is a queue-based optimization of BellmanโFord that only relaxes edges from vertices whose distance just improved.
BellmanโFord finds single-source shortest paths even when some edge weights are negative.
A DSU with weighted edges (also called a potential or difference-constraint union-find) maintains relative values between elements while still supporting near-constant-time merges and finds.