Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 943 Bytes

File metadata and controls

33 lines (23 loc) · 943 Bytes

Sorting algorithms implemented in C++

About

Work done for asignment at UdeC - Master in computer science.

Implementations:

The algoritms included in this repository are the following:

  • Bubblesort
  • Selectionsort
  • Insertionsort
  • Quicksort with static pivot
  • Quicksort with random pivot selection
  • Mergesort naive
  • Mergesort 'in-place'
  • Heapsort
  • Introsort ---- currently working on it ----

Input data:

The algorithms receive a pointer to an array, containing the elements. The vector_utility.cpp contains different utility functions for creating, writing, reading and more.

Binary file structure

The files contain 4 bytes representing the size of the array, stored as an integer. And then all the array data.

Read function requires specify data type.

How to test:

For testing simply compile and run the "run.cpp" file. You will need a vector stored as binary file to use as input.