Skip to content

Interactive sorting algorithm visualizer built using Python and Matplotlib. Includes Bubble, Selection, Insertion, and Quick Sort animations.

Notifications You must be signed in to change notification settings

snehasharma858/Sorting-Algorithm-Visualizer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Algorithm Visualizer

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.


🚀 Features

  • 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)

✨ My Enhancements (Fork Improvements)

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

🧠 Algorithms Included

1. Bubble Sort

Repeatedly compares adjacent elements and swaps them if out of order.

2. Selection Sort

Finds the minimum element and moves it to the correct position.

3. Insertion Sort

Builds the sorted array one element at a time.

4. Quick Sort

Uses divide-and-conquer and partitioning to sort large arrays efficiently.


📊 Time & Space Complexity

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)

🛠️ Tech Stack

  • Python 3.x
  • Matplotlib
  • Tkinter (if UI is included)
  • Standard Python libraries

📥 Installation

  1. Clone the repository:

  2. Install dependencies:

  3. Run the visualization:


📸 Screenshots

(Add screenshots here once uploaded)


🔮 Future Improvements

  • 🔵 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

🎯 Project Purpose

Helps students visualize sorting algorithms clearly, making learning easier and more interactive.


📝 Resume-Ready Description

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.


🙌 Credits

This project was extended and improved by Sneha Sharma.

About

Interactive sorting algorithm visualizer built using Python and Matplotlib. Includes Bubble, Selection, Insertion, and Quick Sort animations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%