Skip to content

Sorting Algorithm Visualizer in Python using Matplotlib FuncAnimation; insertion & selection with GIF/MP4 output.

Notifications You must be signed in to change notification settings

aliyahscoding/sorting-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Algorithm Visualizer

CI

Python animation of classic sorting algorithms using Matplotlib FuncAnimation.

https://github.com/aliyahscoding/sorting-visualizer

Demo

Insertion Sort demo

Features

  • Algorithms: Insertion sort, Selection sort (easy to add more)
  • CLI controls for size, algorithm, speed, and output format (GIF/MP4)
  • Deterministic runs via --seed

How to run

# Windows PowerShell (from repo root)
python src\visualize_sort.py --n 40 --algo insertion --speed 30 --format gif
python src\visualize_sort.py --n 60 --algo selection --speed 24 --format mp4

Outputs land in reports/.

Complexity
- Insertion sort: average/worst O(n^2), best O(n), in-place, stable
- Selection sort: always O(n^2), in-place, not stable (in general)

About

Sorting Algorithm Visualizer in Python using Matplotlib FuncAnimation; insertion & selection with GIF/MP4 output.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages