Dijkstra’s algorithm is very similar to Prim’s algorithm for minimum spanning tree. Like Prim’s MST, we generate a SPT (shortest path tree) with given source as root. We maintain two sets, one set contains vertices included in shortest path tree, other set includes vertices not yet included in shortest path tree. At every step of the algorithm, we find a vertex which is in the other set (set of not yet included) and has a minimum distance from the source.
Telegram Link - https://t.me/codewithr
Youtube Link - / codewithr
Playlist Link - • Graph Theory Full Series | Python | In Hindi
#CodeWithR
#Coding
Graph Theory Videos Links:
01-Adjacency List VS Adjacency Matrix - • 01- Graph representation in Data Structure...
02-DFS - • 02- DFS Graph Traversals | Depth First Sea...
03-Counting Connected Component - • 03- Connected Components | How to find con...
04-Single Source Shortest Path - • 04- Single Source Shortest Path | Graph Th...
05-Bipartite Graph - • 05- Bipartite Graph | Graph Theory | Python
06-Cycle Detection - • 06- Cycle Detection | Graph Theory | Python
07-In/Out Time - • 07- In/Out Time In a Tree | Graph Theory |...
08-Diameter of a Tree - • 08- Diameter Of A Tree | Graph Theory | P...
09-Calculating SubTree Size - • 09- Calculating SubTreeSize | Graph Theor...
10-Finding Bridges - • 10- Finding Bridges | Graph Theory | Python
11-Articulation Points - • 11- Articulation Point | Graph Theory | Py...
12-BFS - • 12- Breadth First Search (BFS) | Graph The...
13-SSSP Using BFS - • 13- Single Source Shortest Path using BFS ...
14-Topological Sort - • 14-Topological Sort (Kahn's Algortihm) | G...
15-Introduction To 2D Grid - • 15- Introduction to 2D Grid | Graph Theory...
16-DFS on 2D Grid - • 16- Depth First Search(DFS) on 2D Grid | G...
17-BFS on 2D Grid - • 17- Breadth First Search (BFS) on 2D Grid ...
18-Questions On 2D Grid - • 18- Questions on 2D Grid | Graph Theory | ...
19-Jungle Run - • 19- Jungle Run | Graph Theory | Python
20-Counting Rooms - • 20- Counting Rooms | Graph Theory | Python
21-Chess Knight Moves - • 21- Chess Knight Moves | Graph Theory | Py...
22-Minimum Spanning Tree - • 22- Minimum Spanning Tree | Graph Theory |...
23-Disjoint Set - • 23- Disjoint Set | Graph Theory | Python
24-Kruskal Algorithm - • 24- Kruskal Algorithm | Graph Theory | Python
25-Concept Of Heap - • 25- Concept Of Heap | Graph Theory | Python
26-Prims Algorithm - • Video
27-Dijkstra's Algorithm - • 27- Dijkstra Algorithm | Graph Theory | Py...
28-Bellman Ford - • 28- Bellmanford Algorithm | Graph Theory |...
29-Floydwarshall Algorithm - • Video
30-Tarjan's Algorithm - • 30- Tarjan's Algorithm | Graph Theory | Py...