A Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’) and explores the neighbor nodes first, before moving to the next level neighbors.

Below image shows order in which the nodes are expanded in BFS –

Below is the list of commonly asked interview questions that can be solved using BFS –

- Breadth First Search (BFS) | Iterative & Recursive Implementation

- Minimum number of throws required to win Snake and Ladder game

- Determine if given graph is Bipartite Graph or not

- Check if an undirected graph contains cycle or not

- Chess Knight Problem | Find Shortest path from source to destination

- Shortest path in a Maze | Lee algorithm

- Find shortest safe route in a field with sensors present

- Flood Fill Algorithm

- Count the number of islands

- Find Shortest path from source to destination in a matrix that satisfies given constraints

**Thank you for being with us. ðŸ™‚**

## Leave a Reply