Name: ________________________________
Honor Code Acknowledgment: ___________________
Does list need to be reference parameter? why/why not
Part B ( 2 points)
Write the function prototype/header for the function
SplitList so
that the function MergeSort above will work as intended.
Part C ( 2 points)
If SplitList and Merge execute in
O(n) time for a list of n
elements, what is the complexity
of the implementation of MergeSort above? Why?
The code below is the body of an implementation of
SplitList.
Add statement(s) as needed to make it work properly.
True or False: It never makes sense to use an O(n^2)
sort since O(n \log n)
sorts exist. Justify your answer (briefly).
Problem 1: Sorting with John Barleycorn
Consider the following code for implementing a merge sort of two linked
lists.
Part D ( 2 points)
Problem 2 : Canine Order (2 poinst)