Implementation of some of the sorting algorithms with an evaluation of the performance of these algorithms and test their performance on large datasets. It's a college assignment for the CMP302A6: Design and Analysis of Algorithms course implemented using C++ under Linux.
The implemented algorithms:
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Hybrid Sort
- C++: Implement the algorithms
- Python: Generate the random data, and plot the stats
- Shell Script: Automate the test from the terminal
Open the src
directory and then:
sudo chmod +x ./test.sh
./test.sh
python runscript.py <size of the data> <path of the output file>
Example:
python runscript.py 100 data.txt
g++ -O2 sort.cpp
./a.out <The algorithm number> <The path of the input file> <The path of the output file> <The path of the stats file>
Example:
./a.out 1 data.txt sorted_data.txt running_time.txt
python plot_charts.py
python plot_tables.py