CSCI 261 - Programming Concepts - Spring 2022

Lab 5D - Sorting II & Recursion II: Merge Sort via the Call Stack

This lab is due by Wednesday, April 13, 2022 11:59 PM.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.


Instructions


For this lab, you are to implement the LinkedList Merge Sort algorithm as discussed in class.

The style of implementation is to your choosing (procedural or object-oriented).

To test your implementations, perform the following steps:

  1. Create a list of integers
  2. Populate the list with the values in order: 4 3 8 1 5 9 7 2 6
  3. Print the list forwards (prints 4 3 8 1 5 9 7 2 6)
  4. Sort the list
  5. Print the list forwards (prints 1 2 3 4 5 6 7 8 9)

Lab Submission


Submit your main.cpp, Makefile, *.hpp, *.h, *.cpp file(s).

You will submit your solution to this lab with the rest of Set5. Detailed instructions for doing this are posted in Assignment 5.


This lab is due by Wednesday, April 13, 2022 11:59 PM.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.