Question DSA-HEAP-0018
HardWhy is Dijkstra's algorithm usually implemented with a min-heap?
- A.
To repeatedly extract the unvisited vertex with the smallest tentative distance in O(log V)
- B.
To sort the vertices alphabetically
- C.
Sign up free to see the answer and a step-by-step explanation.