Shortest path from source to all reachable vertices in a DAG - an example

preview_player
Показать описание
Shortest path from source to all reachable vertices in a DAG - an example

Please let me know how I could improve my videos and do leave a like/comment if it helped you out! :)

02:17 - topological sort/linearization of the DAG;
04:01 - initializing values of dist and prev
05:27 - traversing the graph to find the shortest path
09:16 - how do we know the shortest path from the output of the algorithm?
10:43 - psuedocode (from "Algorithms"by S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani) and runtime of the algorithm

____
Рекомендации по теме
Комментарии
Автор

Lets say I do Topological sort, and topoSort is same for all (irrespective of starting source) then what is the use of starting node, how answer differ when we have different starting point.

ayushkapri