The best implementation for the single source shortest path algorithm of…
2026
The best implementation for the single source shortest path algorithm of DIJKSTRA's algorithm on a dense graph G = (V, E) will use
- A.
ADJACENCY MATRIX
- B.
ADJACENCY LIST
- C.
BINARY MIN HEAP
- D.
FIBONACCCI HEAP
Attempted by 81 students.
Show answer & explanation
Correct answer: A
The current solution is empty. For dense graphs where E ≈ V², Dijkstra's algorithm using an adjacency matrix achieves O(V²) time complexity. Adjacency list with binary heap gives O(E log V), which is worse for dense graphs.