What is the primary use of a priority queue in graph algorithms?
A. To store all vertices of the graph.
B. To keep track of the visited nodes.
C. To efficiently manage and retrieve the minimum or maximum element.
D. To represent the adjacency matrix.
Answer: Option C
Join The Discussion