Our data structures final project. Written in C++, the following code allows one to observe the time and complexity a sorting algorithm takes whilst trying to sort a dataset.
The following algorithms were tested:
- Insertion Sort
- Selection Sort
- Bubble Sort
- Merge Sort
- Heap Sort
- Quick Sort
Task 1 uses the algorithms to sort a dataset of ascending, descending, and random numbers of the following sizes: 100, 300, 500, 1000, 3000, 5000, 10000, and 50000. The amount of time the sorting algorithm took in microseconds as well as the number of "steps" the algorithm took were logged.
Task 2 uses the algorithms to sort a pre-existing dataset of 50 sets of (n) numbers in order to better understand the time and complexity of an algorithm, as well as to recieve more stable results. The datasets were of the following (n) sizes: 100, 300, 500, 1000, 3000, 5000, 10000, and 50000.
The sets of numbers are located in the folder titled tasktwo50sets.
Find the repl.it below to run the program.
https://replit.com/@kiddosh/datastruct-group-replit#main.cpp
Find the spreadsheet below for the recorded results.
https://docs.google.com/spreadsheets/d/121UUNcrse2GhqaRmZjgt0jRfIKzRb3-ehKHQrx-p3Bc/edit?usp=sharing