in DS retagged by
3,064 views
3 votes
3 votes

In the ________ traversal we process all of a vertex's descendants before we move to an adjacent vertex.

  1. Depth First
  2. Breadth First
  3. Width First
  4. Depth Limited
in DS retagged by
by
3.1k views

2 Answers

2 votes
2 votes
A. Depth First Search

Since DFS uses stack, it pushes all the descendent nodes of a vertex and processes it before processing any adjacent node.

That is why the name DEPTH FIRST.
1 vote
1 vote

The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking.

Answer: