GATE Assistant

Past questions › Data Science and Artificial Intelligence › GATE 2024

GATE 2024 · DA · MCQ · 1 mark · Programming, Data Structures and Algorithms › Graph Theory & Traversals

GATE 2024 Data Science and Artificial Intelligence question: Consider performing depth-first search (DFS) on an undirected and unweighted graph G…

Consider performing depth-first search (DFS) on an undirected and unweighted graph starting at vertex . For any vertex in , is the length of the shortest path from to . Let be an edge in such that . If the edge is explored first in the direction from to during the above DFS, then becomes a ______ edge.

  1. (A)

    tree

  2. (B)

    cross

  3. (C)

    back

  4. (D)

    gray

Show answer

Official answer: A

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion