GATE CS 2017 · Set-2 · Asymptotic Analysis & Recurrences

MCQ · 2 marks · Problem PROG-DIVC-0094

Consider the recurrence function\[T(n)=\left\{\begin{matrix} 2T(\sqrt{n})+1, & n \gt 2\\ 2,& 0 \lt n\leq 2 \end{matrix}\right.\]Then T(n) in terms of \(\theta\) notation is
  1. A
    \(\theta (log log n)\)
  2. B
    \(\theta (logn)\)
  3. C
    \(\theta (\sqrt{n})\)
  4. D
    \(\theta (n)\)

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/118623/gate2017-2-30

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