campus placement CoCubes Mock Test Algorithms Asymptotic Worst Case Time and Time Complexity Recurrences
Algorithm A(n)
{
if (n = 2) return 1;
else
return (A(√ n)) ;
}
The time complexity of the above algorithm1
O(log n)
2
O(log log n)
3
O(\({n^2}^{}\) log n)
4
O(n log n)