✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What is the worst-case time complexity of this function?
def func(n):
counter = 0
i = 1
while i <= n:
for j in range(i):
counter += 1
i *= 2
return counter
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!