Skip to content
Related Articles

Related Articles

Algorithms | Graph Traversals | Question 12

View Discussion
Improve Article
Save Article
  • Last Updated : 28 Jun, 2021

If the DFS finishing time f[u] > f[v] for two vertices u and v in a directed graph G, and u and v are in the same DFS tree in the DFS forest, then u is an ancestor of v in the depth first tree. (Source
(A) True
(B) False

Answer: (B)

Explanation: In a graph with three nodes, r u and v, with edges (r; u) and (r; v), and r is the starting point for the DFS, u and v are siblings in the DFS tree, neither as the ancestor of the other.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!