Question DSA-GRAPH-0057
MediumIn a directed acyclic graph, what is the fastest way to find single-source shortest paths?
- A.
Bellman–Ford, in O(VE)
- B.
Dijkstra only
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Graphs question
In a directed acyclic graph, what is the fastest way to find single-source shortest paths?
Bellman–Ford, in O(VE)
Dijkstra only
Sign up free to see the answer and a step-by-step explanation.
Floyd–Warshall
Relax edges in topological order, in O(V + E)