The running time of an algorithm is represented by the following recurrence…
GATE · 2009 · CS
The running time of an algorithm is represented by the following recurrence relation:
T(n) = n, if n ≤ 3; T(n) = T(n/3) + cn, otherwise.
Which one of the following represents the time complexity of the algorithm?
- A.
Θ(n)
- B.
Θ(n log n)
- C.
Θ(n²)
- D.
Θ(n² log n)
Attempted by 283 students.
Sign up free to check your answer
Sign up freeLoading lesson…