Suppose that the list of keys is as given in Exercise 18. Use the quick sort algorithm, as discussed in this chapter, to determine the number of times the function partition is called to completely sort the list.
REFERENCE:
Assume the following list of keys:
36, 55, 89, 95, 65, 75, 13, 62, 86, 9, 23, 74, 2, 100, 98
This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the middle element of the list.
a. Give the resulting list after one call to the function partition.
b. What is the size of the list that the function partition partitioned?
c. What are the sizes of the two sublists created by the function partition?
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.