Closed vaskoz closed 4 years ago
Good morning! Here's your coding interview problem for today.
This problem was asked by Apple.
Implement the function fib(n), which returns the nth number in the Fibonacci sequence, using only O(1) space.
fib(n)
O(1)
Identical to Day 233: https://github.com/vaskoz/dailycodingproblem-go/issues/479
Good morning! Here's your coding interview problem for today.
This problem was asked by Apple.
Implement the function
fib(n)
, which returns the nth number in the Fibonacci sequence, using onlyO(1)
space.