A sleek and minimal web-based sorting algorithm visualizer built with HTML, CSS, and JavaScript. This project helps users understand how sorting algorithms work step-by-step through intuitive animations.
- ๐ Visualize popular sorting algorithms in real time
- ๐ Bar chart representation of the array
- ๐ Orange: Comparison highlight
- ๐ Pink: Swap highlight
- ๐ Choose from multiple sorting algorithms
- ๐น Easy-to-use controls for reset and sorting
- ๐ก Clean and responsive UI (dark theme)
- HTML5 โ Structure of the page
- CSS3 โ Styling and animations
- JavaScript (ES6) โ Logic and dynamic interactions
๐ Add your live demo URL here (e.g., GitHub Pages)
๐ฆ sorting-visualizer/ โฃ ๐ index.html โฃ ๐ style.css โฃ ๐ script.js โฃ ๐ README.md โ ๐ธ screenshot.png (optional)
- โ Bubble Sort
- โ Insertion Sort
- โ Selection Sort
- โ Merge Sort
- โ Quick Sort
1. Clone the repository:
```bash
git clone https://github.com/your-username/sorting-visualizer.git
cd sorting-visualizer
```
2. Open index.html in your browser.
3. Choose an algorithm from the dropdown.
4. Click Sort to see the animation.
5. Use Reset to generate a new unsorted array.
๐ง Learning Goals
-
Visualize how classic sorting algorithms operate
-
Learn DOM manipulation using JavaScript
-
Understand animation timing and UI feedback
-
Practice clean code separation between logic and UI
๐ก Future Enhancements
-
๐ Display runtime and comparison counters
-
๐ Adjustable array size and speed
-
๐ฑ Mobile responsiveness
-
๐ Add more algorithms (e.g., Heap Sort, Radix Sort)
-
๐จ Theme switcher (light/dark)