![]() |
VOOZH | about |
Iterated Logarithm or Log*(n) is the number of times the logarithm function must be iteratively applied before the result is less than or equal to 1.
Applications: It is used in the analysis of algorithms (Refer Wiki for details)
Output :
Log*(100) = 2
Time Complexity: O(logn)
Auxiliary Space: O(logn) due to recursive stack space
Iterative Implementation :
Time Complexity: O(logn)
Auxiliary Space: O(1)