MCQ Practice Single Best Answer Topic: Time Complexity

Q How is the time complexity of Dijkstra's algorithm for finding the shortest path in a graph characterized?

Question ID
#21496
Subchapter
Time Complexity
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A O(N)
  • B O(log N)
  • C O(N^2)
  • D O(E + V log V), where E is the number of edges and V is the number of vertices.
Correct Answer: D

Explanation

Dijkstra's algorithm has a time complexity of O(E + V log V) for finding the shortest path in a graph.

Share This Question

Share this MCQ with your friends or study group.