Examveda

What is the primary purpose of using a priority queue in graph algorithms like Dijkstra's?

A. To store all edges of the graph.

B. To maintain the order of vertices during BFS.

C. To perform depth-first search more efficiently.

D. To efficiently extract the vertex with the minimum distance.

Answer: Option D


This Question Belongs to Data Structure >> Graphs

Join The Discussion

Related Questions on Graphs

What is a cycle in a graph?

A. A path that starts and ends at the same vertex with no other repetitions.

B. A path that includes all vertices exactly once.

C. A path with no edges.

D. A complete traversal of all vertices.