Visualizing Breadth First Search Algorithm which is an algorithm that traverses or searches tree data structures and graphs. The algorithm starts at the root of a tree and follows each branch as far as it can, then backtracks until it encounters an unexplored path, and explores it. In simple words, breadth-first search starts by the exploration of the graph to its deepest point. When the deepest point is reached, it backtracks to a previous unex- plored neighbor. This process is then repeated until the whole graph is explored. If an isolated vertex is identified to be unvisited by the end of the process, BFS would be carried again starting from that vertex.
To run BFS-Visualizer
, pip install using:
git clone https://github.com/omarrayyann/BFS-Visualizer
pip install pygame
run BFS-visualizer
1- Click on the screen to add new vertices
2- Connect any of the vertices together
3- Click Visualize
4- Click Clear once it's over and start again!