This project was created for my Data Structures and Algorithms course. It creates randomized arrays of integers and implements the insertion sort, quicksort, and heapsort algorithms.
- Creates randomized arrays of sizes: 100, 1000, 5000, and 10000
- Sorts the arrays with insertion sort
- Builds max heaps of the arrays
- Sorts the arrays with heapsort
- Sorts the arrays with quicksort using the median of 3 and insertion sort at a certain cutoff version of the algorithm
- Shows the number of comparisons and swaps each implementation of the sorting algorithms use
100% (30/30)
I created this project on Microsoft Visual Studio 2022, so creating a new empty C++ project and inserting the files into the Source Files should allow the code to run in Visual Studio.
I also included a makefile, so the code can run on the Linux command line. The command to run the
code is make run
.