# π Algorithm Visualizer
An interactive tool that visualizes various sorting and pathfinding algorithms using HTML, CSS, and JavaScript. This project is designed to help users understand how different algorithms work through visual representation.
Features β¨
- Dynamic Array Size: Users can specify the size of the array to visualize. π
- Multiple Sorting Algorithms: Visualize various sorting algorithms, including:
- Bubble Sort π
- Quick Sort β‘
- Merge Sort π
- Pathfinding Algorithms: Implement pathfinding algorithms such as:
- A* Algorithm πΊοΈ
- Breadth-First Search (BFS) π
- Color Coding: Different colors represent different states (e.g., sorted, unsorted, current element). π¨
- Speed Control: Users can adjust the speed of the visualization to their preference. β±οΈ
- Responsive Design: The visualizer is designed to work on various screen sizes, making it accessible on both desktop and mobile devices. π±π»
Technologies Used π οΈ
- HTML: For structuring the web application.
- CSS: For styling and layout.
- JavaScript: For implementing the algorithms and interactivity.
Installation π
To set up the project locally, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/yourusername/algorithm-visualizer.git- Navigate to the project directory:
cd algorithm-visualizer - Open
index.htmlin your web browser: You can do this by double-clicking theindex.htmlfile or using your browser's file menu to open it.
Usage π
- Generate Array:
- Use the input field to specify the size of the array (between 5 and 100).
- Click the "Generate Array" button to create a new random array. π’
- Start Sorting:
- Click the "Start Sorting" button to visualize the sorting algorithm. The current algorithm can be modified in the JavaScript code. π
- Reset:
- Click the "Reset" button to clear the current visualization and generate a new array. π
- Speed Control:
- Use the speed slider to adjust the speed of the visualization. This allows you to slow down or speed up the animation for better understanding. β‘
Contributing π€ Contributions are welcome! If you have suggestions for improvements or new features, please follow these steps:
- Fork the repository. π΄
- Create a new branch:
git checkout -b feature/YourFeature
- Make your changes and commit them:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/YourFeature
- Open a pull request. π
Acknowledgments π
- Inspired by various algorithm visualization projects.
- Special thanks to the open-source community for their contributions and resources.
Contact π§ For any inquiries or feedback, please reach out to vchebby876@gmail.com.