Multiple choice technology performance

A quicksort algorithm to sort n records has a performance proportional of the order of

  1. n

  2. n squared

  3. n log(n)

  4. e raised to n

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Quicksort uses divide-and-conquer, recursively partitioning around a pivot element. Each level processes all n elements, and there are O(log n) levels on average (balanced partitions), giving n log(n) complexity. Best and average cases are n log(n), worst case (already sorted with poor pivot choice) degrades to n squared. Linear n and exponential e^n are incorrect.