Groups
Category
SPFA is a queue-based optimization of BellmanโFord that only relaxes edges from vertices whose distance just improved.
Breadth-First Search (BFS) explores a graph level by level, visiting all vertices at distance d from the source before any at distance d+1.