in Algorithms
842 views
0 votes
0 votes

Consider the following sequence of nodes for the undirected graph given below$:$

$(1)PQSTWVUR$
$(2)PQRSTUWV$
$(3)PQRTUSVW$
A Depth First Search (DFS) is started at node $P.$The nodes are listed in the order they are first visited.
Which all of the above are possible outputs$?$
$A)Only (2)$
$B)(1) and (2)$
$C)(2) and (3)$
$D)(1) and (2)$

in Algorithms
842 views

4 Comments

PQRTUSVW

When the control Reached the U node , the possible ways for it are the adjecent  nodes which are not Visited.

And One Such node is { W }, So other than W it has no options to Move . But in the 3rd option it is given that it has moved to S, Which is Wrong.

 

0
0
moved by
Correct Options Of this Question Are:

1 and 2
0
0
B is the answer!
1
1

Please log in or register to answer this question.