GATE CS 1997 · Asymptotic Analysis & Recurrences

MCQ · 1 mark · Problem PROG-DIVC-0164

Let T(n) be the function defined by \(T(1) =1, \: T(n) = 2T (\lfloor \frac{n}{2} \rfloor ) + \sqrt{n} \text{ for } n \geq 2\). Which of the following statements is true?
  1. A
    \(T(n) = O \sqrt{n}\)
  2. B
    T(n)=O(n)
  3. C
    \(T(n) = O (\log n)\)
  4. D
    None of the above

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/2247/gate1997-4-6

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