Examveda

What is the role of the 'parent' array in the implementation of Dijkstra's algorithm?

A. To store the previous node for each node.

B. To store the current distance from the source.

C. To mark visited nodes.

D. To track the minimum distance.

Answer: Option A


Join The Discussion

Related Questions on Graph Algorithms (DFS, BFS, Dijkstras, etc)