✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Is the following function tail-recursive?
def fib (n: int, a: int = 0, b: int = 1) -> int:
if n == 0:
return a
elif n == 1:
return b
else:
return fib(n - 1, b, a + b)
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!