How do you solve questions like this:
x = 1
while x <= (log n)^2:
x = 3x
Runtime should be:
log log n
Does anyone have some kind of resource how to analyze the runtime of loops?
x = 1
while x <= (log n)^2:
x = 3x
Runtime should be:
log log n
Does anyone have some kind of resource how to analyze the runtime of loops?