GATE CS 2014, set 2 · Question 24 · Algorithms · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
Consider the tree arcs of a BFS traversal from a source node W in an unweighted, connected, undirected graph. The tree T formed by the tree arcs is a data structure for computing
- (A) the shortest path between every pair of vertices.
- (B) the shortest path from W to every vertex in the graph.
- (C) the shortest paths from W to only those nodes that are leaves of T.
- (D) the longest path in the graph.
Answer
Answer (B)
Answer from the official GATE CS 2014 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes