0 0 votes Consider a Directed Acyclic Graph (DAG). We want to find the shortest path from a source vertex $S$ to all other vertices. Since the graph is a DAG, which approach provides the most efficient time complexity?Dijkstra's Algorithm Topological Sort followed by relaxation Floyd-Warshall Algorithm Bellman-Ford Algorithm Programming in Python goclasses python-&-dsa goclasses-da-dpp goclasses-da-dpp-day-109 goclasses-python-&-dsa-practice-questions + – GO Classes 245 views answer comment Share Follow Print See 1 comment 1 1 comment reply chidambareswar23 commented Mar 5 reply Follow flag Algorithms: GATE CSE 2026 | Set 2 | Question: 27 0 0 replyShare Please log in or register to add a comment.
0 0 votes For DAGs, processing vertices in topological order allows us to compute shortest paths in linear time. GO Classes answered Feb 26 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Source: CLRS chidambareswar23 answered Mar 5 chidambareswar23 comment Share Follow 0 reply Please log in or register to add a comment.