If quicksort is being used to sort an array that is in descending order, why would a function call to partition make any progress?

A. It wouldn’t. Each element would be greater than the pivot, so nothing would be accomplished.
B. The pivot would be selected and ultimately placed into the middle (or close to the middle) of the array.
C. The pivot, at least, ends up in its final resting place in (what will be) the sorted array.
D. A single call to the partition function would sort the left side of the array, and then the right side of the array so, in this case, tremendous progress would be made.

C

Computer Science & Information Technology

You might also like to view...

The ________ key on the keyboard accesses Help in Office 2010

Fill in the blank(s) with correct word

Computer Science & Information Technology

How many columns and rows does the table coded in the accompanying figure contain?

A. 3 columns and 4 rows B. 4 columns and 4 rows C. 6 columns and 4 rows D. 4 columns and 6 rows

Computer Science & Information Technology