Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2001 | Question 39

  • Last Updated : 28 Jun, 2021

Consider an undirected unweighted graph G. Let a breadth-first traversal of G be done starting from a node r. Let d(r,u) and d(r,v) be the lengths of the shortest paths from r to u and v respectively in G. If u is visited before v during the breadth-first traversal, which of the following statements is correct?
(A) d(r, u) < d(r, v)
(B) d(r,u) > d(r,v)
(C) d(r,u) <= (r,v)
(D) None of the above


Answer: (C)

Explanation: See question 4 of https://www.geeksforgeeks.org/data-structures-and-algorithms-set-8/

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :