Explain the basic concept of Breadth-First Search (BFS).

  • Traverses a graph by exploring nodes in a random order
  • Traverses a graph in reverse order
  • Traverses a graph level by level, exploring neighbor nodes before moving to the next level
  • Traverses a graph using recursion
BFS explores a graph level by level, starting from the source node. It visits neighbor nodes before moving to the next level, ensuring all nodes at the current level are visited before proceeding.
Add your answer
Loading...

Leave a comment

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