https://github.com/marcpinet/sort-visualizer
🧮 A simple sorting algorithm visualizer written in Python with Pygame (with a lot of algorithms to observe).
https://github.com/marcpinet/sort-visualizer
pygame python sort sorting-algorithms sorting-visualization
Last synced: 11 months ago
JSON representation
🧮 A simple sorting algorithm visualizer written in Python with Pygame (with a lot of algorithms to observe).
- Host: GitHub
- URL: https://github.com/marcpinet/sort-visualizer
- Owner: marcpinet
- License: mit
- Created: 2022-03-11T00:15:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-01T18:53:40.000Z (about 1 year ago)
- Last Synced: 2025-02-01T19:32:23.549Z (about 1 year ago)
- Topics: pygame, python, sort, sorting-algorithms, sorting-visualization
- Language: Python
- Homepage: https://marcpinet.me
- Size: 84 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sorting Visualizer
[](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [](https://www.python.org/) [](https://svgshare.com/i/ZhY.svg) [](https://GitHub.com/Naereen/ama)
A simple graphical sorter written in Python with Pygame where you can visualize many algorithms and see how they actually work.
You can adjust the speed using → or ← and shuffle the array at the end of the sorting to restart the algorithm by pressing SPACE. Finally, press ESC to exit.
I will add more algorithms when I have time.
## How to use
Just launch the `main.py`, choose your algorithm and the size of the array to sort.
When the Pygame window gets opened, press SPACE to start the algorithm.
## Known issues
- Nothing yet!
## Demo
### Quick Sort - Randomized Array
https://user-images.githubusercontent.com/52708150/158039436-4f7f3847-20ff-4f5f-8981-53d9babdfc36.mp4
### Merge Sort - Randomized Array
https://user-images.githubusercontent.com/52708150/158039423-6e953005-65d8-437c-9da1-f279f738a600.mp4
### Heap Sort - Randomized Array
https://user-images.githubusercontent.com/52708150/158039415-4e5dfd88-dc88-4c53-9f15-f79d7954352d.mp4
## Support 👨💻
Any problems with running the script and any questions please create a new issue [here](https://github.com/marcpinet/sorting-visualizer/issues/new?assignees=&labels=&template=bug_report.md&title=).
You can also contribute to this project by requesting new features [here](https://github.com/marcpinet/sorting-visualizer/new?assignees=&labels=&template=feature_request.md&title=).
I never ask for money for my open source projects. However, you can still tip me if you want.
I am a [Brave Verified Creator](https://i.imgur.com/fOUfdM5.png)!
## Prerequisites
* Python 3.7.0+
Get a copy of the Project. Assuming you have git installed, open your Terminal and enter:
```bash
git clone 'https://github.com/marcpinet/sorting-visualizer.git'
```
To install all needed requirements run the following command in the project directory:
```bash
pip install -r requirements.txt
```
## Running 🏃
After that you can proceed to start the program by running `main.py`.
## TO-DO List
- Nothing yet.
## Authors
* **Marc Pinet** - *Initial work* - [marcpinet](https://github.com/marcpinet)
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
## Acknowledgments
* Hat tip to anyone whose code was used.