Question: Please help me implement this in C++, I have been able to implement this in Java but I am having difficulty implementing this in C++

Please help me implement this in C++, I have been able to implement this in Java but I am having difficulty implementing this in C++
* Implement this in C++ * The purpose of this program is to compare the computing times of the two classical sorting algorithms Mergesort and Quicksort where Insertionsort is used as a threshold sort. Although for large lists, Insertionsort is, on average, much slower than Mergesort and Quicksort, it is faster than both for sufficiently small lists. A useful technique to improve the efficiency of a divide-and conquer sorting algorithm is to employ a sorting algorithm such as Insertionsort when the input size is smaller than or equal to some threshold t (e.g., a number between 8 and 16 usually works well) Instead of the bootstrap condition being a list of size and simply doing nothing other tharn return when this condition is satisfied, the bootstrap condition is now a list of size and Insertionsort is called when this condition is satisfied. Your task is to: 1. Implement the sorting algorithms Mergesort and Quicksort using Insertionsort as the threshold sort. Your program should be menu driven and user friendly. The program should begin by displaying documentation describing the program. It should ask the user to enter the threshold value and then the list. The user should first be asked for the size of the list. For lists of size at most 15, prompt the user whether the list is to be entered manually or randomly generated and whether the list is to be displayed. If the user has specified that the list is to be displayed the computer should output the unsorted and sorted lists for both sorting algorithms. Lists of size greater than 15 should automatically be randomly generated and not displayed. For the threshold and list entered by the user your program will execute Mergesort followed by Quicksort. Include an outer loop to allow the user to repeat this process as often as desired. 2. After you have Part 1 working, add the option to display the number of comparisons performed by each algorithm. Suggestion: use a global counter in each algorithm that is incremented each time a comparison is made to keep track of the total number of comparisons performed. 3. Run your program for sufficiently many lists and threshold values, and write a short discussion about what you conclude to be the best sorting routine and the best choice for the threshold t for these algorithms. Include this discussion in a Word (of pdf) file called discussion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
