Category
Level
Dijkstraβs algorithm can be adapted to track the second shortest path by keeping the best and second-best distances per vertex.