Vidyalelo
Data Structure · Q14

Graph Algorithms (DFS, BFS, Dijkstras, etc)

Programming · Data Structure · question 14

Q14

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

A.
To store the previous node for each node.
Answer
B.
To store the current distance from the source.
C.
To mark visited nodes.
D.
To track the minimum distance.

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board