What random pivots guarantee

A Quick Sort implementation chooses a pivot uniformly at random from each active range, moves it to the last position, and partitions using a strict less-than test. It then makes two ordinary recursive calls, excluding the pivot, and returns immediately for ranges of size zero or one.


Which statements about sorting nn keys are correct? Select every correct statement. Count comparisons between scanned keys and pivots, excluding pivot-selection work.

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Quick Sort Questions: