Que2: The n-th term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula - F(n) = F(n - 1) + F(n - 2), Where, F(1) = 1, F(2) = 1 Provided 'n' you have to find ...
This code defines a fibonacci function that takes an integer n as input and returns the nth Fibonacci number. The function uses dynamic programming to store previously computed Fibonacci numbers in an ...