code modification to stop execution when target vertex is reached
code modification for saving shortest path Part 1: ASSIGNMENT: Note 1 tells us that this code determines the shortest path to every other vertex. It does not specifically keep track of the vertices in the shortest path to our target vertex. The code calculates shortest distance, but doesn’t calculate the path information. We can create […]
