GabrielDertoni / sorting-race

Some sorting algorithms implemented in C for comparison.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sorting


A collection of sorting algorithms inplemented in the C programming language.

Installation

With make, simply run

make all

Racing the algorithms

An example of racing quick, radix, merge and heap sort with 1.000.000 integers and averaging the times over 10 runs.

./race quick radix256 merge heap -n 1000000 -r 10

Result of executing code above

Implemented Algorithms

  • Bubble Sort
  • Insertion Sort
  • Merge Sort
  • Merge Sort (3 splits)
  • Heap Sort
  • Cocktail Sort
  • Quick Sort
  • Radix Sort (base 256)

About

Some sorting algorithms implemented in C for comparison.

License:MIT License


Languages

Language:C 94.9%Language:C++ 3.9%Language:Makefile 1.2%