Different Functions, Same Output
Computer Science Level 2The two functions shown below compute the \(n^\text{th}\) Fibonacci number.
For large values of \(n\), one of the functions is significantly faster than the other. Which function is faster, fib1
or fib2
?
1 2 3 4 5 6 7 8 9 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 

Your answer seems reasonable.
Find out if you're right!
Sign up to access problem solutions.
That seems reasonable.
Find out if you're right!
Already have an account? Log in here.