0
3.9kviews
Write single source shortest path algorithm and apply the same for following.
1 Answer
0
28views

enter image description here

Ans:

Algorithm:

Algorithm

1) Create a set sptSet (shortest path tree set) that keeps track of vertices included in shortest path tree, i.e., whose minimum distance from source is calculated and finalized. Initially, this set is empty.

2) Assign a distance value to all vertices in the input graph. Initialize …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.