Category
Level
SPFA is a queue-based optimization of BellmanβFord that only relaxes edges from vertices whose distance just improved.