Starting from:
$30

$24

Use your implementations to build a hybrid sorting


The description provided for this problem:

Given the results of part 1 (Merge sort vs. Insertion sort), use your implementations to build a hybrid sorting algorithm that combines the two (called Tim sort).  When you recurse in Merge sort, if a partition size is less than or equal to some constant k, you should use insertion sort, but if it is greater than k you should continue with Merge sort.  Experimentally determine what value of k will optimize speed. 

Is k the same as the crossover point for part 1?  Why do you think this is or is not the case?  Generate a graph comparing this hybrid sort to both Insertion Sort and Merge sort.  Make sure to test with a wide range of values for k (to be sure of your answer) as well as more than one size of n (in case the number of values sorted affects your answer).

Upload your write-up (see the assignment description for what should go into the write-up) as a pdf along with any associated supporting files (e.g., source code, etc).

More products