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

  1. A.

    ADJACENCY MATRIX

  2. B.

    ADJACENCY LIST

  3. C.

    BINARY MIN HEAP

  4. 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.

Explore the full course: Tpsc Assistant Technical Officer