Which step in Dijkstra's algorithm involves updating the distance to a vertex if a shorter path is found?
Initialize distances to infinity
Add vertex to the settled set
Overlook minor misbehaviors
Impose harsh punishments for any infraction

Data Structures and Algorithms Exercises are loading ...