GATE CS 2006 · Heap Sort & Non-Comparison Sorts

MCQ · 1 mark · Problem PROG-SORT-0052

The median of n elements can be found in O(n) time. Which one of the following is correct about the complexity of quick sort, in which median is selected as pivot?
  1. A
    \(\theta\)(n)
  2. B
    \(\theta\)(nlogn)
  3. C
    \(\theta (n^{2})\)
  4. D
    \(\theta (n^{3})\)

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/1830/gate2006-52

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com