Multiple choice technology

The data structures needed to implement Dijkstra's algorithm are

  1. Adjacency List, 2D array, Stack

  2. Heap, Adjacency List, Queue

  3. Binary tree, Hash table

  4. 2D array, Queue

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Dijkstra's algorithm needs: (1) a graph representation via Adjacency List for efficient neighbor access, (2) a Heap (typically min-heap) to efficiently extract the vertex with minimum distance in O(log V), and (3) a structure to manage visited/unvisited vertices or frontier, typically implemented via Queue or priority queue. Option B has all essential components.