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

https://github.com/omarazizi/sort-spectra

Sorting Algorithms Visualizer in C
https://github.com/omarazizi/sort-spectra

Last synced: 7 months ago
JSON representation

Sorting Algorithms Visualizer in C

Awesome Lists containing this project

README

          

# Sort-Spectra
In order to complete this project I used the [SDL](https://www.libsdl.org/) library with C.

![Screenshot_20221206-215850_Instagram](https://github.com/OmarAzizi/Sort-Spectra/assets/110500643/cc86ea9e-0820-4738-8b3f-57b73270fc6f)

## Demo
This is a demo for some algorithms sorting an array of 600 shuffled elements.

### Merge Sort

https://github.com/OmarAzizi/Sort-Spectra/assets/110500643/088928c2-3804-4c96-a641-219a3b467c0b

### Radix Sort

https://github.com/OmarAzizi/Sort-Spectra/assets/110500643/799863f7-3459-404c-9e4f-0123d6ecba95

### Quicksort

https://github.com/OmarAzizi/Sort-Spectra/assets/110500643/38457163-053c-4383-931f-3d61834333f9

### Heapsort

https://github.com/OmarAzizi/Sort-Spectra/assets/110500643/915c0322-4375-4f0c-9e21-035ee2e53820

## Usage

Clone the repository:
```bash
git clone https://github.com/OmarAzizi/Sort-Spectra.git && cd Sort-Spectra
```

Then build the program from Makefile and run it:
```bash
make build && ./final
```

It will open the window for you, and in order to start the sorting you have to press:
- 1 on they keyboard for **Mergesort**
- 2 on they keyboard for **Radix Sort**
- 3 on they keyboard for **Quicksort**
- 4 on they keyboard for **Heapsort**