Given an integer n, return the nth Fibonacci number. The Fibonacci sequence is defined as follows:
F(0) = 0F(1) = 1F(n) = F(n-1) + F(n-2) for n >= 2Implement the function using memoization to optimize the recursive calls.
Example 1:
Input: n = 5
Output: 5
Explanation: The Fibonacci sequence is 0, 1, 1, 2, 3, 5. Thus, F(5) = 5.
Example 2:
Input: n = 10
Output: 55
Explanation: The Fibonacci sequence up to F(10) is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. Thus, F(10) = 55.
0 <= n <= 30