Doubt doubt doubt

Q14) Find complexity of the following

void pat(){

//executes log (input size) times

for (int i = 2; i <=n; i = pow(i, c)) {

System.out.print("*")

}

//Here fun is sqrt or cuberoot or any other constant root
//executes log n times

for (int i = n; i > 1; i = fun(i)) {

System.out.print("*")

}
}

a) O(N LogN)

b) O(N^3)

c) O(N^2)

d) LogLog N

my answer: (log N + log N)

Please see this Explain why loglogN

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.