This project implements a QuickSort algorithm for sorting city populations. It includes three pivoting strategies (last, random, median) and a hybrid approach that switches to insertion sort based on a defined threshold.
To build and run this project:
- Clone the repository.
- Navigate to the project directory.
- Execute
g++ -fdiagnostics-color=always -g QuickSort.cpp -o QuickSort
- Run the execute with the following format:
./QuickSort <DATASET-FILE-NAME>.csv <l|r|m> <THRESHOLD VALUE> <OUTPUT-FILE-NAME>.csv [v]
This workflow builds a Docker image and compiles the QuickSort code whenever changes are pushed to the main
branch or a pull request is made. It runs QuickSort for all populations and all pivoting strategies with threshold 1, and for all population with randomized pivot strategy for several different thresholds.
This workflow performs linting on the QuickSort.cpp file using cppcheck.
This repository was made public after the submission date.