
Do it as a c ++ please and explain each step
Sort an array of 10,000 elements using the quick sort
a. Sort the array using pivot as the middle element of the array.
b. Sort the array using pivot as the median of the first, last, and
middle elements of the array.
c. Sort the array using pivot as the middle element of the array. However, when the size of any sublist reduces to less than 20, sort the sublist
using an insertion sort.
d. Sort the array using pivot as the median of the first, last, and
middle elements of the array. When the size of any sublist reduces to
less than 20, sort the sublist using an insertion sort.
e. Calculate and print the CPU time for each of the preceding four steps.

Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images

- Write a C++ program : Question:Ask user to give you a list of the numbers and then Sort them, by calling two functions: Asc(Sort in Ascending order), and Desc(Sort in Descending order): Do the above question by using array. First ask user how many numbers are there in the list and then get the numbers and sort them.arrow_forwardPython languagearrow_forwardUsing the srand() and rand() C++ library, generate a vector of integers. Prompt the user for the size of the list. The random integers should be scaled to the range 1 to 100 (see page 283). Sort the numbers using the sort function from the algorithm library and display the numbers. Then calculate the percent of numbers from 1 to 50 (including 50) and from 51 to 100. Report the percentages.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





