- GATE CS
- 2026–27 pattern practice
- Algorithms
- Graph algorithms
- Easy
Dijkstra's algorithm implemented with a binary min-heap on a graph with V vertices and E edges runs in
Algorithm Design
Pick an option to check your answer.
Answer: A. Solution
There are extract-min operations and up to decrease-key operations, each on a binary heap: .
Why not the others
- only is the simple array implementation; good for dense graphs but not the heap version.
- is BFS on unweighted graphs.
- is Bellman–Ford.