What is the Big O runtime of the following code?
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
What is the Big O runtime of the following code?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What is the Big O runtime of the following code?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!