Do it as a c ++ please and explain each step Sort an array of 10,000 elements using the quick sort algorithm as follows: 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.
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 now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images