Let G(V, E) an undirected graph with positive edge weights. Dijkstra’s single-source shortest path algorithm can be implemented using the binary heap data structure with time complexity:
(A) O(| V |2)
(B) O (| E | + | V | log | V |)
(C) O (| V | log | V |)
(D) O ((| E | + | V |) log | V |)
Answer: (D)
Explanation: See Time Complexity Section of http://www.geeksforgeeks.org/greedy-algorithms-set-7-dijkstras-algorithm-for-adjacency-list-representation/
Quiz of this Question
Recommended Posts:
- GATE | GATE-CS-2003 | Question 67
- Important Topics for GATE 2018 Computer Science
- GATE | GATE CS 1996 | Question 75
- GATE | GATE CS 1996 | Question 74
- GATE | GATE CS 1996 | Question 73
- GATE | GATE CS 1996 | Question 72
- GATE | GATE CS 1996 | Question 71
- GATE | GATE CS 1996 | Question 70
- GATE | GATE CS 1996 | Question 69
- GATE | GATE CS 1996 | Question 68
Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.

