An interactive Python-based visualization tool for understanding how sorting algorithms work.
This project animates step-by-step sorting operations using Matplotlib, making it easier to understand how each algorithm behaves internally.
- Visualizes popular sorting algorithms
- Bubble Sort
- Selection Sort
- Insertion Sort
- Quick Sort
- Clean and simple UI
- Color-coded comparisons and swaps
- Adjustable speed (FPS)
- Beginner-friendly code structure
- GIF demo included (quick sort)
This project is a fork that I have extended and improved with:
- 📘 Improved documentation & explanations
- 🎨 Updated and modernized color scheme
- 📊 Added Time & Space Complexity Table
- 🧠 Added algorithm descriptions for easier understanding
- 🔧 Cleaned up code structure for readability
- 📝 Enhanced README with screenshots, installation steps & future plans
- 🧩 Planned addition: Merge Sort visualization
Repeatedly compares adjacent elements and swaps them if out of order.
Finds the minimum element and moves it to the correct position.
Builds the sorted array one element at a time.
Uses divide-and-conquer and partitioning to sort large arrays efficiently.
| Algorithm | Best | Average | Worst | Space |
|---|---|---|---|---|
| Bubble Sort | O(n) | O(n²) | O(n²) | O(1) |
| Selection Sort | O(n²) | O(n²) | O(n²) | O(1) |
| Insertion Sort | O(n) | O(n²) | O(n²) | O(1) |
| Quick Sort | O(n log n) | O(n log n) | O(n²) | O(log n) |
- Python 3.x
- Matplotlib
- Tkinter (if UI is included)
- Standard Python libraries
-
Clone the repository:
-
Install dependencies:
-
Run the visualization:
(Add screenshots here once uploaded)
- 🔵 Add Merge Sort visualization
- 🔴 Add Heap Sort
- ✨ Add GUI controls to choose algorithms
- 🌐 Convert Python visualizer to a web-based version
- 📈 Add step counter & performance metrics
Helps students visualize sorting algorithms clearly, making learning easier and more interactive.
Sorting Algorithm Visualizer (Python): Built an interactive animation-based visualizer for Bubble, Selection, Insertion, and Quick Sort. Improved UI, added complexity documentation, enhanced explanations, and structured the project for clarity. Successfully extended features in a forked repository.
This project was extended and improved by Sneha Sharma.