Dijkstra and Shortest Path Algorithms - Implementations in Python - Problem Set

Download Q&A
Q. What is the time complexity of Dijkstra's algorithm when using a priority queue implemented with a binary heap?
  • A. O(V^2)
  • B. O(E log V)
  • C. O(V log V)
  • D. O(E + V)
Q. What will happen if Dijkstra's algorithm is run on a graph with negative weight edges?
  • A. It will still find the shortest path.
  • B. It may produce incorrect results.
  • C. It will terminate with an error.
  • D. It will only work for the first negative edge.
Showing 1 to 2 of 2 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely