Skip to content

Small class project to find the different run times for different sorting algorithms in various scenarios.

Notifications You must be signed in to change notification settings

ecast96/Sorting-Algorithm-Benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Sorting Algorithm Benchmark

  • All work done by Erick Castro

Program was made using Visual Studio 2017. If using any other IDE/Compiler, support for C++11 might be needed.

Program is menu-driven, meaning you select what options you want for the sorting algorithms. There are lines commented out that are used for testing/debugging purposes (e.g. Displaying arrays, writing to file, and displaying individual interation duration).

Data is saved to a csv file named "results.csv". Times are saved in 100 cell rows

When compiling and running, program will display the following menus:

Sorting Algorithm:
 1 - Insertion Sort
 2 - Selection Sort
 3 - Bubble Sort
 4 - Quick Sort
 5 - Merge Sort

Array Size: 
 1 - 10
 2 - 1,000
 3 - 10,000
 4 - 100,000
 5 - 1,000,000

Array Type:
1 - Array already sorted (in-order)
2 - Array sorted but shuffled at 10%
3 - Array complete shuffled (random numbers)
4 - Array in reverse order.

You select each option by it's left-hand value:

Algorithm List:
1 - Insertion Sort 
2 - Selection Sort
3 - Bubble Sort 
...
...
Select Algorithm: //Here you enter 1, 2, 3, etc.

Time_Results.xlsx contains an overall look at the run times for every scenario.

  • Each iteration is timed in seconds and the mean and standard deviation is calculated for 100 iterations.

Program can be run without menus:

  • Line 16 in main.cpp will run a specific operation with operations selected.
    • Options can be seen above in the menus.

About

Small class project to find the different run times for different sorting algorithms in various scenarios.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published