how to calculate time complexity for this
What is the complexity of the following recurrence :
7T(n/2) + an^2
how to calculate time complexity for this
What is the complexity of the following recurrence :
7T(n/2) + an^2
Hey @chitwan_manchanda , see this carefully
T(n) = 7T(n/2) + 3n^2 + 2
As one can see from the formula above:
a = 7, b = 2, and f(n) = 3n^2 + 2
So, f(n) = O(n^c), where c = 2.
It falls in master’s theorem case 1:
logb(a) = log2(7) = 2.81 > 2
It follows from the first case of the master theorem that T(n) = ?(n^2.8) and implies O(n^2.8) as well as O(n^3).
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.