Visualize sorting algorithms interactively with animated bars and get insights on their time complexity using AI.
🔗 Live Demo: Data Structure Visualizer
- Interactive visualization of Bubble Sort, Selection Sort, Insertion Sort, Merge Sort
- Animated bars representing array elements (like in the screenshot below)
- Adjustable array and sorting speed for step-by-step learning
- AI-generated insights for each algorithm’s time complexity
- Clean, dark-themed interface for better user experience
| Algorithm | Time Complexity (Avg) | Space Complexity | Stability |
|---|---|---|---|
| Bubble Sort | O(n²) | O(1) | ✅ Stable |
| Selection Sort | O(n²) | O(1) | ❌ Unstable |
| Insertion Sort | O(n²) | O(1) | ✅ Stable |
| Merge Sort | O(n log n) | O(n) | ✅ Stable |
- Frontend: HTML, CSS, JavaScript
- Deployment: Vercel
- AI Insights: Google AI Studio API (secure key required for live insights)
To run locally:
# Clone repository
git clone https://github.com/<your-username>/data-structure-visualizer.git
# Go into project folder
cd data-structure-visualizer
# Open index.html in your browser
open index.html # or double-click index.html