aashrafh / sortizer

Analysis of Sorting Algorithms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sortizer

πŸ“ Table of Contents

🧐 About

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

πŸ“Š Stats

Image Demo
Image Demo
Image Demo
Image Demo

⛏️ Built Using

  • C++: Implement the algorithms
  • Python: Generate the random data, and plot the stats
  • Shell Script: Automate the test from the terminal

πŸ’» Install

Open the src directory and then:

Automate Test

sudo chmod +x ./test.sh
./test.sh

Generate Random Data

python runscript.py <size of the data> <path of the output file>

Example:

python runscript.py 100 data.txt

Compile

g++ -O2 sort.cpp

Run

./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

Plot

python plot_charts.py
python plot_tables.py

About

Analysis of Sorting Algorithms

License:MIT License


Languages

Language:C++ 72.7%Language:Python 21.5%Language:Shell 5.8%