When i tried to find the time complexity of this recurrence relation with the master theorem, I got log^2n, but I'm told that it's logn. I used the masters theorem, for this case.. a=b^k (1=4^0) ... This means that this is a case 2 in the masters theorem. Then p in this case is 1 since log^1n. So the answer for case 2 where p>-1 would be n^k log^p+1n = theta(log^2n). But the solution on my exam said the answer is theta(logn). Can you help me understand.
Asked
Active
Viewed 116 times