closed by
511 views
0 0 votes
closed as a duplicate of: GATE CSE 2001 | Question: 2.14
Consider a graph G. Let T be a BFS tree with root r. Let d(u,v) denote the length of the shortest path between the nodes u and v. If v is visited before u in the breadth first search traversal, which of the following statements is true ?

 

A. d(r,v) > d(r,u)

B. d(r,v) = d(r,u)

C. d(r,v) < d(r,u)

D. insufficient information to comment on d(r,v) and d(r,u)
Position:
Show:

Related questions

0 0 votes
1 1 answer
2.2k
2.2k views
rsansiya111 asked Dec 8, 2021
2,155 views
Suppose we want to extend the union-find data structure to support the operation Reset(c), which takes as input the name of a component c and then breaks up c into single...
0 0 votes
3 3 answers
1.7k
1.7k views
rsansiya111 asked Dec 8, 2021
1,729 views
Suppose there are k sorted lists (decreasing order) with n/k elements in each list.What is the time complexity to merge them into one single sorted list.Hint: Maintain a ...
1 1 vote
1 1 answer
558
558 views
2 2 votes
1 answers 1 answer
1.3k
1.3k views
rsansiya111 asked Dec 8, 2021
1,341 views
Suppose we do merge sort with a three-way split: divide the array into 3 equal parts, sort each part and do a 3 way merge.What would the worst-case complexity of this ver...