GATE | GATE-CS-2002 | Question 36
The running time of the following algorithm Procedure A(n)
If n < = 2 return (1) else return (A(Image not present√nImage not present));
is best described by :
(B) O(log n)
(C) O(log Log n)
Now let the function is called k times
Taking log on both side (base 2).
Taking log again.
See question 5 of https://www.geeksforgeeks.org/data-structures-and-algorithms-set-11/
This solution is contributed by Parul Sharma.