GATE CS 2026 · Set-2 · Asymptotic Analysis & Recurrences
MSQ · 1 mark · Problem PROG-DIVC-0067
Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity \(\Theta(n)\)?
- A
\(T(n)=T(n-1)+1, \quad T(1)=1\)
- B
\(T(n)=2 T\left(\frac{n}{2}\right)+1, \quad T(1)=1\)
- C
\(T(n)=2 T\left(\frac{n}{2}\right)+n, \quad T(1)=1\)
- D
\(T(n)=T(n-1)+n, \quad T(1)=1\)
Solve it on GATE DA practice →More Searching & Sorting Algorithms problems
Show the worked solution
Official GATE Answer Key: A, B.See full step-by-step discussion on GateOverflow:
https://gateoverflow.in/523131/gate-cse-2026-set-2-question-15
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com