Algorithms | Analysis of Algorithms (Recurrences) | Question 6
Last Updated :
Discuss
Comments
The running time of an algorithm is represented by the following recurrence relation:
if n <= 3 then T(n) = n
else T(n) = T(n/3) + cn
Which one of the following represents the time complexity of the algorithm?
(A) [Tex]\\theta[/Tex](n)
(B) [Tex]\\theta[/Tex](n log n)
(C) [Tex]\\theta[/Tex](n^2)
(D) [Tex]\\theta[/Tex](n^2log n)
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy