Dijkstra and Shortest Path Algorithms - Complexity Analysis - Higher Difficulty Problems

Download Q&A
Q. If a graph has 5 vertices and 10 edges, what is the maximum time complexity of Dijkstra's algorithm using an adjacency matrix?
  • A. O(10)
  • B. O(5^2)
  • C. O(5 log 5)
  • D. O(10 + 5^2)
Q. What is the space complexity of Dijkstra's algorithm when using a priority queue?
  • A. O(V)
  • B. O(E)
  • C. O(V + E)
  • D. O(V log V)
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