Refer to assignment for description of problem.
Solution: Here are two solutions, the first with just the required part and the second with the extra-credit part too:
Refer to assignment for description of problem.
Solution: Here are two solutions, the first making the array for memoization a global variable and the second making it a parameter to the recursive-with-memoization version of the Fibonacci function:
The first method is simpler in a way, but strictly speaking requires one to consider what to do if the array is not big enough; the second one is not quite as simple except that one can make the array just big enough.