Dijkstra and Shortest Path Algorithms - Complexity Analysis - Competitive Exam Level

Download Q&A
Q. If a graph has V vertices and E edges, what is the space complexity of Dijkstra's algorithm using an adjacency list?
  • A. O(V)
  • B. O(E)
  • C. O(V + E)
  • D. O(V^2)
Q. In Dijkstra's algorithm, what data structure is primarily used to keep track of the minimum distance from the source vertex?
  • A. Array
  • B. Stack
  • C. Queue
  • D. Priority Queue
Q. What is the main advantage of using a Fibonacci heap with Dijkstra's algorithm?
  • A. It reduces the space complexity.
  • B. It improves the time complexity for decrease-key operations.
  • C. It allows for negative weights.
  • D. It simplifies the implementation.
Q. What is the primary limitation of Dijkstra's algorithm?
  • A. It cannot find paths in directed graphs.
  • B. It cannot handle negative weight edges.
  • C. It is not efficient for dense graphs.
  • D. It requires a complete graph.
Showing 1 to 4 of 4 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely