An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Sorting Visualizer

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![Windows](https://svgshare.com/i/ZhY.svg)](https://svgshare.com/i/ZhY.svg) [![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.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.