✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What is the time complexity of the following function if measured with respect to n?
def mystery(n: int) -> None:
if n <= 0:
return
else:
if n % 2 == 0:
mystery(n - 1)
else:
mystery(n // 2)
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!