Consider a DFS is implemented on an undirected weighted graph G. Let d(r,u) and d(r,v) be the weight of the edge (r,u) and edge (r,v) respectively. If v is visited immediately after u in a depth-first traversal, which of the following statements is correct?

1
d(r, u) > d(r, v)
2
d(r, u) < d(r, v)
3
All u’s edges have been explored
4
All v’s edges have been explored

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation