https://github.com/helios2003/benchmarking-of-sorting-algorithms
Comparing the performance of different sorting algorithms
https://github.com/helios2003/benchmarking-of-sorting-algorithms
algorithms-and-data-structures python sorting
Last synced: 2 months ago
JSON representation
Comparing the performance of different sorting algorithms
- Host: GitHub
- URL: https://github.com/helios2003/benchmarking-of-sorting-algorithms
- Owner: helios2003
- Created: 2023-04-25T21:33:48.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-25T10:55:18.000Z (about 2 years ago)
- Last Synced: 2025-02-08T16:13:48.016Z (4 months ago)
- Topics: algorithms-and-data-structures, python, sorting
- Language: Python
- Homepage:
- Size: 2.38 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Benchmarking-of-Sorting-Algorithms
This is an assignment in Design and Analysis of Algorithms(CS253) course. The objective of the assignment is to compare the performance of various traditional sorting
algorithms taught during the semester and plot graphs for them which showcase their preformance for various cases.
The instructions to run the code the code is as follows.
* Fork of the repository.
* Clone the repository using the HTTPS key.
## Running the Code
After cloning the repository navigate to the root directory of the project.
* Run ```pip install -r requirements.txt```
* Each of the 5 sorting algorithms are present in their respective folders.
* Since there is data present in the csv files hence execute ```src/python flush.py``` before running the code.
* The csv files present for each sorting algorithm contains the input size and the time taken for sorting for all the three types of arrays i.e. increasing array, randomly generated array and decreasing array.
* Execute ```src/python test_cases.py``` for generating the csv files.
* Navigate to the ```Q3``` folder and run each of the ```qs_avg_case.py```, ```quick_best_case.py``` and ```quick_worst_case.py``` files to generate the graphs which compare the performance of quick sort in the 3 different choice of pivots.
* Navigate to the ```Q4``` and execute the files in the folder to see the performance of each algorithm vs the other in different cases.
* Final_Report.pdf has the answers to all the questions provided in the assignment.
> **_NOTE:_** After completing the visualisation make sure to run ```flush.py``` otherwise the programs run into errors.