ISRO 2020 · Graph Traversals (BFS & DFS)

MCQ · 1 mark · Problem PROG-GRPH-0052

G is an undirected graph with vertex set {v1, v2, v3, v4, v5, v6, v7} and edge set {v1v2, v1v3, v1v4 ,v2v4, v2v5, v3v4, v4v5, v4v6, v5v6, v6v7 }. A breadth first search of the graph is performed with v1 as the root node. Which of the following is a tree edge?
  1. A
    v2v4
  2. B
    v1v4
  3. C
    v4v5
  4. D
    v3v4

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/331350/isro2020-32

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com