A React-based application to visualize sorting algorithms and pathfinding algorithms with beautiful animations using Framer Motion. This project was created as a learning tool for Data Structures and Algorithms.
- Visualize popular sorting algorithms:
- Bubble Sort
- Quick Sort (coming soon)
- Merge Sort (coming soon)
- Insertion Sort (coming soon)
- Control the speed of the visualization
- Generate new random arrays of different sizes
- Color coding to highlight comparisons, swaps, and sorted elements
- Visualize pathfinding algorithms:
- Breadth-First Search
- Dijkstra's Algorithm (coming soon)
- A* Search Algorithm (coming soon)
- Create walls to block paths
- Customize grid size and animation speed
- Visual indications for visited nodes and the shortest path
- React.js: For building the user interface
- Framer Motion: For smooth animations and transitions
- TailwindCSS: For styling
- Vite: For fast development and building
- Node.js (v16 or later recommended)
- npm or yarn
-
Clone the repository:
git clone <your-repo-url> cd algorithm-visualizers
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
src/components/sorting: Components for the sorting visualizersrc/components/pathfinding: Components for the pathfinding visualizersrc/algorithms: Implementation of various algorithmssrc/utils: Helper functions for arrays and grid operations
Here are some resources to help you understand the algorithms implemented:
Feel free to contribute to this project by:
- Implementing additional algorithms
- Improving visualizations
- Adding new features
- Fixing bugs
This project is open source and available under the MIT License.
Happy visualizing and learning! 🚀