Suppose I have a recursive function T
, and I want to calculate the upper bound timer complexity of this function.
T(1) = 3
T(n) = 3T(n/3) + 3.
How can I find the upper bound of the time complexity of T(n)?
Use the master theorem case where a=3, b=3, c=0.
I highly recommend the MIT lectures on Algorithms. You can learn more about the Master theorem in lecture 2