...

/

Solution Review: Fibonacci Numbers

Solution Review: Fibonacci Numbers

Let’s take a detailed look at the previous challenge’s solution.

We'll cover the following...

Solution

A Fibonacci number is calculated by adding the previous two Fibonacci numbers. At the start, we assume the first two numbers are 1 and 1. So, its formula is f(n) = f(n-1) + f(n-2).

Example

For example, the Fibonacci series is 1,1,2 ...