Corner cases. Test quicksort on large nonrandom arrays of the kind described in exercises 2.1.35 and 2.1.36 both with and without the initial random shuffle. How does shuffling affect its performance for these arrays?
Exercises 2.1.35
Nonuniform distributions. Write a client that generates test data by randomly ordering objects using other distributions than uniform, including the following:
■ Gaussian
■ Poisson
■ Geometric
■ Discrete (see exercise 2.1.28 for a special case)
Develop and test hypotheses about the effect of such input on the performance of the algorithms in this section.
Exercise: 2.1.28
Equal keys. Formulate and validate hypotheses about the running time of insertion sort and selection sort for arrays that contain just two key values, assuming that the values are equally likely to occur.
exercises 2.1.36
Nonuniform data. Write a client that generates test data that is not uniform, including the following:
■ Half the data is 0s, half 1s.
■ Half the data is 0s, half the remainder is 1s, half the remainder is 2s, and so forth.
■ Half the data is 0s, half random int values.
Develop and test hypotheses about the effect of such input on the performance of the algorithms in this section.
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.