$24
Feel free to discuss and help each other out, but does not imply that you can give away your code or your answers! Make sure to read all instructions before attempting this lab. You can work with a lab partner and submit one lab package for your group.
You must use an appropriate provided template from Canvas or my website (zeus.mtsac.edu/~tvo) and output "Author: Your Name(s)" for all your programs. If you are modifying an existing program, use "Modified by: Your Name(s)".
Lab question 1: What are some good reasons for sorting a list of values?
Lab question 2: What are the three steps in a divide-and-conquer algorithm design pattern?
Implement Insertion Sort and collect data regarding number of key comparisons and data moves for a small list of 10 integer values. You must try a sorted list, a descending list, and a random list.
Implement Merge Sort from the book and test it on a small list of 10 random integer values.
Extra Credit: Collect actual run times for both insertion sort and merge sort for a random list of values of various sizes. Try the following random lists: 1000, 10000, and 100000 random integer values.
Fill out and turn in the lab submission sheet with this lab. Staple the lab submission sheet, output and source code for all required programs (output and source code) and turn it in by specified due date (can optionally turn in output and source code as a PDF file via Canvas, but make sure to turn in the lab submission sheet).