Q. Which of the following is a valid implementation detail of Dijkstra's algorithm?
-
A.
Using a depth-first search approach
-
B.
Updating the distance of adjacent nodes only if they are visited
-
C.
Using a priority queue to select the next node
-
D.
Storing all nodes in a single array
Solution
Dijkstra's algorithm uses a priority queue to efficiently select the next node with the smallest tentative distance.
Correct Answer:
C
— Using a priority queue to select the next node
Learn More →
Showing 1 to 1 of 1 (1 Pages)