Fibonacci Finder
Fibonacci FinderCreate a fib_finder()
function that finds the nth number in the Fibonacci sequence. As a reminder, the Fibonacci sequence is a mathematical sequence that begins with 0 and 1, with each following term being the sum of the two previous terms.
For example, the first two terms of the sequence are represented by fib_finder(1)
and fib_finder(2)
, which return 0
and 1
, respectively. fib_finder(6)
should return 5
.
This challenge was reported to have been asked in interviews at many top companies, including Google. If you’ve covered the material in Pass the Technical Interview with Python or an equivalent, you should be able to solve this challenge. If you have trouble, try refreshing your knowledge with its Dynamic Programming article.