Home »
MCQs »
Algorithms MCQs
The best-case time complexity of Dijkstra's Algorithm is ______.
8. The best-case time complexity of Dijkstra's Algorithm is ______.
- O(V^2)
- O(E + V)
- O(V + E log V)
- O(E log V)
Answer
The correct answer is: D) O(E log V)
Explanation
When using an adjacency list along with a priority queue, the time complexity of Dijkstra's Algorithm is O (E log V), where:
- E is the number of edges
- V is the number of vertices.