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

https://github.com/devarshi16/sorting_comparison

Use this code to compare sorting algorithms and plot the graphs for a visual output.
https://github.com/devarshi16/sorting_comparison

compare-sorting-algorithms graphs matplotlib python

Last synced: 8 months ago
JSON representation

Use this code to compare sorting algorithms and plot the graphs for a visual output.

Awesome Lists containing this project

README

          

# Sorting Comparison
Compare the actual runtime of common sorting algorithms on your system for various input sizes.

**NOTE:** For accurate results, close applications and background overheads on your system.

Install the required libraries
```
$ pip install -r requirements.txt
```

Generate a file containing random numbers which will be sorted.
```
$ python random_generator.py
```

This will create a file `randoms.txt` containing `1000` lines of `400` unsorted numbers separated by commas.

```
$ python sort_comp.py
```

**NOTE:** During code execution do not start or run other applications.

## Result

![Sorting Comparison](comparison.png)

For more inference, check out,
https://wp.me/pa3wrJ-a