Data Structures & AlgorithmsHardGATE CS · TCS NQT

A recurrence T(n) = 6·T(n/3) + n^1 with constant base case. By the master theorem, which tight bound describes T(n)?

  1. A. Θ(n^2)
  2. B. Θ(n)
  3. C. Θ(n log n)
  4. D. Θ(n^(log_3 6))

Correct answer: D. Θ(n^(log_3 6))

Compare a = 6 with b^k = 3^1 = 3: a is larger, so the solution is Θ(n^(log_3 6)). Using the wrong case of the master theorem gives one of the other options.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic