Part A: Implement recursive merge sort.
Part B: Terminate the recursion for merge sort, when the size of the segment is at most 8 (H - L <= 8), and then use insertion sort.
For part A write a program for merge sort using C/C++ programming language. Take your array size to be 1000.You should use recursive Merge sort.
For part B combine merge sort with insertion sort, where you cut the array into two (almost) equal parts. You should terminate the recursion for merge sort, when the size of the segment is at most 8 (H - L <= 8), and then use insertion sort.
Your program should read from a file called data1.txt and write to a file called out1.txt. Your program must sort the numbers in each line in the input file. You should follow the best practices in writing your code. Include source code and a read me file with all the necessary information about the program .
Example input:
2.5 600 -2 100
200 400 20.57 36
Example Output:
-2 2.5 100 600
20.57 36 200 400