Given an integer n, find the nth Fibonacci number.
Constraints: 0 <= n <= 45
Example:
Input: 10
Output: 55
Hint View Explanation View Code
Fibonacci number for position 0 and 1 is 0 and 1 respectively. So wee need to iterate
from 2 to n and add previous two Fibonacci numbers described by the following property-
F i = F i-1 + Fi-2.