Similar questions 2 more →
Graph Algorithms

Answer & solution
Answer: A (no official key was published)
1. All edges have equal unit cost, so increasing distance order is breadth-first order. A FIFO queue processes each vertex and scans each adjacency list once, in O(V+E) time.
2. Thus A; a priority heap is unnecessary.
3. Teaching check: In an unweighted graph, every discovered neighbor is exactly one hop farther than its predecessor. A FIFO queue keeps frontier layers in nondecreasing distance order, which is the priority rule Dijkstra needs here. With adjacency lists the total scan cost is the sum of degrees, O(V+E).