A modern, interactive web application for learning and visualizing algorithms through real-time, step-by-step animations.
Live Demo | GitHub | Documentation
AlgoViz is an educational platform designed to help developers, students, and anyone preparing for coding interviews understand algorithms through beautiful, interactive visualizations. Watch sorting algorithms rearrange bars, see graph traversal explore nodes, and observe pathfinding algorithms find optimal routes.
- Real-Time Visualization: Watch algorithms execute step-by-step with smooth animations
- Interactive Controls: Adjust speed, pause, resume, and reset visualizations
- Multiple Algorithms:
- Sorting: Bubble Sort, Merge Sort, Quick Sort
- Graph Traversal: BFS, DFS
- Pathfinding: Dijkstra's Algorithm, A* Search
- Educational Content: View algorithm complexity, descriptions, and properties
- Modern UI: Beautiful dark theme with responsive design
- Performance Optimized: Smooth animations and efficient algorithms
- Node.js (v14 or higher)
- npm or yarn
-
Clone the repository
git clone https://github.com/yourusername/algoviz.git cd algoviz -
Install dependencies
npm install
-
Start the development server
npm start
-
Open your browser Navigate to
http://localhost:3000
npm run buildThe build folder is ready to be deployed.
- Select an algorithm from the dropdown
- Adjust array size and speed
- Click "Start" to begin visualization
- Watch the bars animate as the algorithm proceeds
- Use "Reset" to generate a new array
- Choose between BFS or DFS
- Select drawing mode (Wall, Start, or End)
- Click on the grid to place walls, start, and end points
- Click "Start" to begin traversal
- Watch the algorithm explore the grid
- Choose between Dijkstra's or A*
- Set your start point (green) and end point (red)
- Draw walls to create obstacles
- Click "Start" to find the shortest path
- The path will be highlighted in purple
src/
βββ components/
β βββ Navbar.js
β βββ LandingPage.js
β βββ SortingVisualizer.js
β βββ GraphVisualizer.js
β βββ PathfindingVisualizer.js
β βββ ControlPanel.js
β βββ InfoPanel.js
βββ algorithms/
β βββ sorting/
β β βββ bubbleSort.js
β β βββ mergeSort.js
β β βββ quickSort.js
β βββ graph/
β β βββ bfs.js
β β βββ dfs.js
β βββ pathfinding/
β βββ dijkstra.js
β βββ aStar.js
βββ styles/
β βββ index.css
β βββ App.css
β βββ Navbar.css
β βββ LandingPage.css
β βββ ControlPanel.css
β βββ InfoPanel.css
β βββ SortingVisualizer.css
β βββ GraphVisualizer.css
β βββ PathfindingVisualizer.css
βββ utils/
β βββ helpers.js
β βββ constants.js
βββ App.js
βββ index.js
- Background: Deep Navy (#020617)
- Card Background: Darker Blue (#0f172a)
- Primary Accent: Cyan (#38bdf8)
- Secondary Accent: Indigo (#6366f1)
- Success: Green (#10b981)
- Warning: Amber (#f59e0b)
- Danger: Red (#ef4444)
- Text: Light Slate (#f1f5f9)
- Frontend: React.js 18
- Styling: Custom CSS3 with CSS Variables
- Animation: CSS transitions + JavaScript timers
- Build Tool: Create React App
- Deployment: Netlify / Vercel
| Algorithm | Best | Average | Worst | Space | Stable |
|---|---|---|---|---|---|
| Bubble Sort | O(n) | O(nΒ²) | O(nΒ²) | O(1) | β |
| Merge Sort | O(n log n) | O(n log n) | O(n log n) | O(n) | β |
| Quick Sort | O(n log n) | O(n log n) | O(nΒ²) | O(log n) | β |
| Algorithm | Time | Space |
|---|---|---|
| BFS | O(V + E) | O(V) |
| DFS | O(V + E) | O(V) |
| Algorithm | Time | Space | Optimal |
|---|---|---|---|
| Dijkstra | O((V+E) log V) | O(V) | β |
| A* | O(b^d) | O(b^d) | β |
Each algorithm includes:
- Description: What the algorithm does
- Complexity Analysis: Time and space complexity for all cases
- Stability: Whether the algorithm maintains relative order of equal elements
- Visual Feedback: Color-coded highlights showing algorithm progress
- Push your code to GitHub
- Connect your repository to Netlify
- Set build command:
npm run build - Set publish directory:
build - Deploy!
- Push your code to GitHub
- Import your project to Vercel
- Vercel auto-detects React apps and configures build settings
- Click deploy!
- Large array sizes (200+) may experience performance degradation
- Grid visualizations optimized for screens 1024px and above
- Some animations may appear choppy on lower-end devices
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Your Name - Initial work
- Inspired by educational algorithm visualization platforms
- Icons from Unicode emoji set
- Color scheme inspired by modern design systems
If you encounter any issues, please:
- Check existing GitHub issues
- Create a new issue with detailed description
- Include screenshots or videos if applicable
- Sound effects toggle
- Side-by-side algorithm comparison
- Custom array input
- Algorithm step-through mode
- More sorting algorithms (Insertion, Selection, Heap)
- More graph algorithms (Prim's, Kruskal's)
- Maze generation algorithms
- User accounts and progress tracking
Happy Learning! π