16 31 36 12 24 40 5 32 42 43 16 31 36 12 24 40 5 32 42 43 16 12 36 31 24 40 5 32
ID: 3730835 • Letter: 1
Question
16 31 36 12 24 40 5 32 42 43 16 31 36 12 24 40 5 32 42 43 16 12 36 31 24 40 5 32 42 43 16 12 36 31 24 40 5 32 42 43 16 12 36 31 24 40 5 32 42 43 16 12 5 31 24 40 36 32 42 43 16 12 5 31 24 40 36 32 42 43 16 12 5 31 24 40 36 32 42 43 16 12 5 31 24 40 36 32 42 43 5 12 16 31 24 40 36 32 42 43 ^Re: CACM April 1984 p.289 CACM October 1978, p.847 ^Lomuto's Partitioning Algorithm ~Given the following numbers in array A ... 16 31 36 12 24 40 5 32 42 43 ... what is the contents of array A after the first pass of Lomuto's version of the partition algorithm for the Quick Sort covered in class? a. 5 12 16 31 24 40 36 32 42 43 b. 42 32 5 16 36 43 24 12 40 31 c. 43 12 42 36 5 40 24 16 31 32 d. 32 36 43 12 42 40 5 31 16 24 e. 16 5 42 36 24 32 31 43 12 40
Explanation / Answer
16 31 36 12 24 40 5 32 42 43
Pivot: 16
[5, 12, 16, 31, 24, 40, 36, 32, 42, 43]
Ans: a
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.