Skip to content
GATEiit

GATE CSE 2017 Session 2 Q40: Solve T(n) = 2T(√n) + 1

Syllabus topic: Asymptotic worst-case time and space complexity

Question

Consider the recurrence function

Then T(n) in terms of Θ notation is

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: B (official GATE 2017 final answer key)

Concept used: Change of variable n=2k turns a square-root recurrence into a standard divide-and-conquer recurrence.

Concept notes

Loading notes…

First step: Put n=2k and S(k)=T(2k) to get S(k)=2S(k/2)+1, then apply the master theorem.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on Asymptotic worst-case time and space complexity

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2017 Session 2 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key