Question: Consider the execution of depth-first search on a digraph G from vertex s, beginning with the function call dfs(G, s). Suppose that dfs(G, v) is
Consider the execution of depth-first search on a digraph G from vertex s, beginning with the function call dfs(G, s). Suppose that dfs(G, v) is called during the depth-first search. At the moment when dfs(G, v) is called, can you infer that the following is true: The edgeTo[] array contains a directed path from s to v.
A. yes B. no C. unknown
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
