Chapter 18: Problem 17
Assume the following list of keys: 48,30,66,50,9,95,80,15,25,18,94,55,3,22,62 This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the median of the first, last, and middle elements of the list. a. What is the pivot? b. Give the resulting list after one call to the function partition. c. What is the size of the list that the function partition partitioned? d. What are the sizes of the two sublists created by the function partition?
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.