https://github.com/ahmedyar7/sorting-visualizer
Sorting Algorithms visualizes using python pygame & generators
https://github.com/ahmedyar7/sorting-visualizer
datastructures-algorithms dsa python sorting sorting-algorithms-implemented sortingalgorithms sortingvisualizer
Last synced: 3 months ago
JSON representation
Sorting Algorithms visualizes using python pygame & generators
- Host: GitHub
- URL: https://github.com/ahmedyar7/sorting-visualizer
- Owner: ahmedyar7
- License: mit
- Created: 2024-07-13T10:25:42.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T21:23:31.000Z (8 months ago)
- Last Synced: 2024-11-04T22:22:42.625Z (8 months ago)
- Topics: datastructures-algorithms, dsa, python, sorting, sorting-algorithms-implemented, sortingalgorithms, sortingvisualizer
- Language: HTML
- Homepage: https://www.linkedin.com/feed/update/urn:li:activity:7246523843538763776/
- Size: 35.8 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sorting Visualizer ๐งฎ
## Overview ๐
This python project was inspired by **[Green Code Sorting Algorithm Video]("https://www.youtube.com/watch?v=N4JVT3eVBP8")**. This python program contain all the popular sorting algoritms visualization by using **`pygame`** and python **`generators`**
# Sorting Algorithms ๐งฎ
| Bubble Sort | Selection Sort | Insertion Sort | Merge Sort | Comb Sort |
| ------------------------------------- | ------------------------------------------- | -------------------------------- | ----------------------------------- | --------------------------------- |
|  |  |  |  |  || Radix Sort | Counting Sort | Quick Sort | Heap Sort | Shell Sort |
| ----------------------------------- | ----------------------------------------- | ----------------------------------- | --------------------------------- | ----------------------------------- |
|  |  |  |  |  |## Depedencies ๐ฆ
1. **Python** ๐
2. **Pygame** ๐ฎ###
```bash
pip install pygame```
## Getting Started ๐
1. Download the Whole repository ๐ or
2. Clone the Repository via git```bash
git clone https://github.com/ahmedyar7/Sorting-Visualizer.git```
3. Make sure the dependencies are met โ
4. Run main.py file```bash
python main.py
```## Project Struture ๐๏ธ
1. **`sorting_algorithms.py`** ๐
- This file contain class `SortingAlgorithms` that contain the algorithms in form of methods
2. **`draw_info.py`** ๐ผ๏ธ
- This file contain the information about the screen and bars rendering.
3. **`visualization.py`** ๐๏ธ
- This file contain class `Visualization` that contain two methods
- `draw()` contain rendering information about the controls/ options rendering and calls the `draw_list()` to draw the actual array
- `draw_list()` This contain the information about the rendering of the list on to the screen.4. **`program.py`** ๐ฆพ
- This file contain class `Program` that 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.5. **`main.py`** ๐ฆ
- This file import the `Program` class and the run the object of that class## Contributions๐ค
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## License โ
[MIT LICENSE](LICENSE)