Data Structures & AlgorithmsVery hardGATE CS · TCS NQT

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

  1. A. Θ(n^(log_4 7))
  2. B. Θ(n log n)
  3. C. Θ(n^2)
  4. D. Θ(n)

Correct answer: A. Θ(n^(log_4 7))

Compare a = 7 with b^k = 4^1 = 4: a is larger, so the solution is Θ(n^(log_4 7)). 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