Skip to content

laerttt/BreadthFirstSearch-Visualiser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BFS Algorithm Visualization

A visualization tool for the Breadth-First Search (BFS) algorithm, which is commonly used to traverse or search tree and graph data structures. BFS explores nodes level by level, starting from the root (or any specified start node) and visiting all nodes at the current depth before moving to the next. This tool demonstrates BFS traversal in a 10x10 grid, allowing users to interactively explore its behavior.

Explanation

This application visualizes how the BFS algorithm traverses a grid-based graph, showing the order in which nodes are visited in real time.

Button Descriptions

  • Add Wall: Adds a wall to cells you click or drag over, creating obstacles for the BFS traversal.
  • Delete Wall: Removes walls by resetting cells to their default state.
  • Add Start: Sets a starting point for the BFS algorithm.
  • BFS: Begins the BFS traversal and displays the process.
  • Show Edges: Reveals the edges between nodes as they are defined in the grid layout.
  • Reset: Resets the entire grid to its default state.
  • Randomize: Randomly places walls throughout the grid. Click again to create a new random wall pattern.

How to Run

  1. Open your preferred Java IDE.
  2. Locate and run Main.java from the path bfsAlgo/src/main/java/com/example/bfsalgo.

Additional Information

For more about the BFS algorithm, refer to this article on GeeksforGeeks.

About

Visualization of Breadth First Search Algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages