The breadth-first search (BFS) algorithm is used to search a tree or graph data structure for a node that meets a set of criteria. It starts at the tree’s root or graph and searches/visits all nodes at the current depth level before moving on to the nodes at the next depth level. Breadth-first search can be used to solve many problems in graph theory.
From(https://www.geeksforgeeks.org/breadth-first-search-or-bfs-for-a-graph/)
This application will help you visualize how the BFS algorithm traverses through a 10x10 grid-like graph.
- Add wall: adds a wall on the cell you click or drag upon several
- Delete wall: deletes(reset to default) any cell you click or drag upon
- Add Start: adds a starting point for the BFS Algorithm to start
- BFS: starts the visualization
- Show Edges: shows the default edges made when the grid is created
- Reset: resets the grid to default
- Randomize: makes random walls on the grid (click again to re-randomize)
- Open your java IDE of choice
- Run Main.java (bfsAlgo/src/main/java/com/example/bfsalgo)