Trivia ForgePlay free →

According to the Master Theorem, what is the complexity of a recurrence T(n) = 8T(n/2) + n^2?

Show answer

Theta(n^3)

In this recurrence, a=8 and b=2, so log_b(a) = 3. Since the driving function f(n) = n^2 is polynomially smaller than n^3 (Case 1 of the Master Theorem), the complexity is dominated by the recursion, resulting in Theta(n^3).

Would you remember this in 6 months?

Trivia Forge uses spaced repetition so facts stick. Free, no signup needed.

Turn on Algorithms practice →

More Algorithms trivia

See all 83 →