Fetching algorithms...
[2]
2
n = [3]
3
Note: This is equivalent to computing Fibonacci numbers; you can solve with O(n) time and O(1) space.
Time Complexity
Space Complexity