Time complexity analysis

kindly provide the solution with an explanation of this question.

check total how many times it will run.

first iteration i is 2
in second iteration i will be 2^k
in third iteration i will be (2^k)^k = 2^(k^2)
in fourth iteration i will be 2^(k^3)

in i+1th iteration i will be 2^(k^(i))

for loop to stop
2^(k^(i) ) > n
take log base 2 both side
k^(i) > log2(n)
take log base k both side
i > log k log2(n)
so this option is correct->

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.