Question

Which of the following statements about Dijkstra’s algorithm is true?

A Works with negative-weight edges but no negative cycles
B Finds shortest paths for directed graphs with negative edges
C Requires all edge weights to be non-negative to guarantee correctness
D Is an algorithm for minimum spanning tree
E Has worst-case time O(E^2) irrespective of data structures
Practice Next

Hey! Ask a query