Similar questions 3 more →
Searching, Sorting & Selection

Your answer
Answer & solution
Answer: C (no official key was published)
Step 1: Random pivot selection improves the expected split quality, but it does not make extreme pivots impossible. A sequence selecting the minimum or maximum at every partition still has nonzero probability.
Step 2: That sequence performs(n−1)+(n−2)+…+1=n(n−1)/2 partition comparisons, yielding Θ(n²).
Thus C is the tight worst-case bound. Θ(n log n) is the expected runtime over the random choices, not the maximum possible runtime of a particular execution.