Breadth First Search

When we can use BFS?

  • Shortest Path in a simple graph?
    • all length of edges in the graph must be equal
  • Level Traverse
  • Connected Components
  • Topological Sorting