Depth-First Search (DFS) Posttest


Answer the multiple-choice questions below to test your understanding!


Multiple-Choice Questions:

  1. What is the primary purpose of Depth-First Search (DFS)?





  2. Which data structure is commonly used to implement DFS?





  3. What is the time complexity of DFS for a graph with V vertices and E edges?





  4. In DFS, how are vertices visited?





  5. What type of graph can DFS be applied to?