The Graph Algorithm Visualizer is an interactive web-based tool built using Python, HTML, CSS, and JavaScript that provides dynamic step-by-step visual simulations of graph algorithms, helping learners clearly understand how nodes are processed, distances are updated, and optimal paths are formed.
- Step-by-step visualization of four algorithms: Dijkstra, Bellman-Ford, Prim, and Kruskal
- Side-by-side algorithm comparison with execution time and performance metrics
- Playback controls (play, pause, next step, reset) for detailed learning
- Real-time visualization using color-coding for nodes, edges, and algorithm states
- Supports weighted graphs and negative edges (Bellman-Ford)
- Displays final MST/shortest path along with total cost and steps taken
- Frontend: HTML, CSS, JavaScript
- Backend: Python, Flask
git clone https://github.com/Susheyyy/Mini-Project-1A.git
cd Mini-Project-1A python -m venv venv Activate the environment
- Windows
venv\Scripts\activate - macOS / Linux
source venv/bin/activate pip install -r requirements.txt python app.py- Enter the number of nodes, edges, and their weights.
- Select an algorithm (Dijkstra, Bellman-Ford, Prim, or Kruskal).
- Click Visualize to see the step-by-step execution.
- Use Play, Pause, Next, and Reset to control the animation.
- View the final path/MST, total cost, and number of steps.
- Open the Comparison page.
- Select any two algorithms.
- Enter your graph details once.
- Click Compare to run both visualizations side-by-side.
- Compare execution time, cost, and traversal behavior.
At any time, you can:
- Clear the graph
- Change inputs
- Run a different algorithm
- Switch to comparison mode