0

For instance, consider the following recurrence relation.

T(n) = T(n/2) + T(n/3) + T(n/4) + n

Would you use the substitution method for this?

1 Answers1

0

You can find an upper bound like this: $T(n)\leq 3T(n/2)+n$.

Solving using master theorem, $T(n)=O(n^{log_23})$

Mr. Sigma.
  • 1,301
  • 1
  • 16
  • 38