Which traversal technique does DFS primarily employ when traversing a graph?

  • Breadth-First Search (BFS)
  • Level-Order Traversal
  • Post-order Traversal
  • Pre-order Traversal
DFS primarily employs Pre-order Traversal when traversing a graph. In Pre-order Traversal, the algorithm visits the root node, then recursively performs Pre-order Traversal on the left subtree and the right subtree.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *