I AM CODING IN C++. We combine two sorting algorithms, insertion-sort and merge-
ID: 3883285 • Letter: I
Question
I AM CODING IN C++.
We combine two sorting algorithms, insertion-sort and merge-sort, as follows: when the input size is less than 100, we use insertion-sort: otherwise, we use merge-sort. More specifically, we replace line 1 in Merge-Sort (page 34) with "if r - p > = 100", and add line 6 "else lnsertion-Sort(A, p, r)". Insertion-Sort(A, p, r) implies performing insertion sort on the subarray A|p middot middot middot r|. In this lab assignment you will implement this hybrid sorting algorithm.