Question: Please use C99 standard to implement these methods. Lab task Submit Lab6_####.cpp to iSpace which includes at least three functions: void Insertion Sort(int *A, int

Please use C99 standard to implement these methods.
Lab task Submit Lab6_####.cpp to iSpace which includes at least three functions: void Insertion Sort(int *A, int n) A is an array of integers and n is the size of A Sort A using insertion sort void MergeSort(int *A, int left, int right) Sort array A[left..right] using merge sort int main(void) Let n be the size of the input array, for n=10 and n=105 do the following operations Generate an array, A1, consisting of n random integers Note: Use malloc to claim an array Generate another array A2 which is identical to A1 Sort A1 using Insertion Sort() and A2 using Merge Sort() For input size n =10, print the array before and after sorting for both functions For input size n =105 print elapsed time in milliseconds during which both functions run, respectively 25 Lab task Submit Lab6_####.cpp to iSpace which includes at least three functions: void Insertion Sort(int *A, int n) A is an array of integers and n is the size of A Sort A using insertion sort void MergeSort(int *A, int left, int right) Sort array A[left..right] using merge sort int main(void) Let n be the size of the input array, for n=10 and n=105 do the following operations Generate an array, A1, consisting of n random integers Note: Use malloc to claim an array Generate another array A2 which is identical to A1 Sort A1 using Insertion Sort() and A2 using Merge Sort() For input size n =10, print the array before and after sorting for both functions For input size n =105 print elapsed time in milliseconds during which both functions run, respectively 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
