Dijkstra Algorithm MCQ Test: Dijkstra Algorithm MCQs - Practice Questions
1. What condition must be satisfied for Dijkstra's algorithm to guarantee the correct shortest paths?
2. In Dijkstra's algorithm, what does the term 'relaxation' refer to?
3. What modification to Dijkstra's algorithm is needed to handle graphs with negative weights?
4. Which step in Dijkstra's algorithm is responsible for selecting the next vertex to process?
5. What is the primary difference between Dijkstra's algorithm and A* algorithm?
6. How does Dijkstra's algorithm behave when there is a negative cycle in the graph?
7. Which algorithm is often compared to Dijkstra's algorithm for finding the shortest path?
8. How does Dijkstra's algorithm handle negative edge weights in a graph?
9. What is the time complexity of Dijkstra's algorithm with an adjacency matrix representation?
10. In a weighted graph, what does the term 'weight' typically represent in the context of Dijkstra's algorithm?
11. What is the role of a 'heap' data structure in optimizing Dijkstra's algorithm?
12. How does Dijkstra's algorithm handle graphs with disconnected components?
13. What is the purpose of the priority queue in Dijkstra's algorithm?
14. When is Dijkstra's algorithm preferred over Bellman-Ford algorithm?
15. Which data structure is commonly used to implement Dijkstra's algorithm efficiently?
16. What is the primary advantage of using Dijkstra's algorithm over other pathfinding algorithms in certain scenarios?
17. How does Dijkstra's algorithm behave when all edge weights are equal?
18. In the context of Dijkstra's algorithm, what does 'SPT' stand for?
19. What is the impact of using a priority queue with insufficient priority updates in Dijkstra's algorithm?
20. Which algorithm is an alternative to Dijkstra's algorithm for graphs with negative edge weights?