Vidyalelo
Data Structure · Q151

Graph Algorithms (DFS, BFS, Dijkstras, etc)

Programming · Data Structure · question 151

Q151

Which of the following is a possible result of depth first traversal of the given graph(consider 1 to be source element)?

Which of the following is a possible result of depth first traversal of the given graph(consider 1 to be source element)?
Graph Algorithms (DFS, BFS, Dijkstras, etc) mcq question image
A.
1 2 3 4 5
Answer
B.
1 2 3 1 4 5
C.
1 4 5 3 2
D.
1 4 5 1 2 3

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board