Page 1 of 1

What is the Big O runtime of the following code?

Posted: Sun May 15, 2022 12:01 pm
by answerhappygod
What is the Big O runtime of the following code?
What Is The Big O Runtime Of The Following Code 1
What Is The Big O Runtime Of The Following Code 1 (90.73 KiB) Viewed 14 times
def random_loops (n): total = 0 o = for i in range(n//2): counter = 0 while counter < n: < n total += 1 counter t= 1 for j in range(n): for k in range(j,n): magic 1 while magic < n: total += 1 magic *= 2 for i in range(100): total += 1 return total