This python project was inspired by Green Code Sorting Algorithm Video. This python program contain all the popular sorting algoritms visualization by using pygame and python generators
| Bubble Sort | Selection Sort | Insertion Sort | Merge Sort | Comb Sort |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Radix Sort | Counting Sort | Quick Sort | Heap Sort | Shell Sort |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
- Python 🐍
- Pygame 🎮
pip install pygame
- Download the Whole repository 📁 or
- Clone the Repository via git
git clone https://github.com/ahmedyar7/Sorting-Visualizer.git
- Make sure the dependencies are met ✅
- Run main.py file
python main.py-
sorting_algorithms.py📜- This file contain class
SortingAlgorithmsthat contain the algorithms in form of methods
- This file contain class
-
draw_info.py🖼️- This file contain the information about the screen and bars rendering.
-
visualization.py🖍️- This file contain class
Visualizationthat contain two methods draw()contain rendering information about the controls/ options rendering and calls thedraw_list()to draw the actual arraydraw_list()This contain the information about the rendering of the list on to the screen.
- This file contain class
-
program.py🦾-
This file contain class
Programthat contain the actual driver code for the whole program, this file import stuff from all other program files. -
play_sound() & stop_sound()These function takes care of playing & stoping of sound -
driver_program()This function provides with the game loop and the keystrokes functionality to the program.
-
-
main.py🚦- This file import the
Programclass and the run the object of that class
- This file import the
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request









