Skip to end of metadata
Go to start of metadata

Abstract

The project was about making a sorting algorithms with different time complexities. The purpose of this project was to learn about time complexities, how they effect code. I used system time to time the different algorithms. I would take the initial system time, run the algorithm, and then subtract the final time. I would do this multiple times and take the average.

Methods

The main computer science concept used in this project was time complexity. We also learned about various sorting algorithms. We measured the time taken to perform different sorting algorithms, and graph the results to see the real impact of the different time complexities. This is useful because we can learn how to write very efficient code..

Specifically, in this project I used insert sort, quick sort, heap sort, and two implementations of merge sort. Each algorithm was timed 5 times for random arrays with different sizes. The 5 times were then average to get one final result for each algorithm and each number of elements.

Results

 

 

Extensions

I wrote an implementation of merge sort that uses multi threading to run recursive calls in different threads. 

Reflection

I learned about time complexities (best and worst case scenarios and big O notation), several different sorting algorithms, and multi-threading.

 

Acknowledgements

Benjamin Raivel

Benjamin Southwick

Cynthia Rosas

Matthew Cerrato

 

Labels