Example 2: The Fibonacci Series
Recursively calculate the Fibonacci series.
We'll cover the following
What is the Fibonacci sequence?
The Fibonacci sequence is a sequence in which each number is the sum of the two preceding ones, starting from 0 and 1. Mathematically:
The beginning of the sequence is thus:
Let’s design a recursive approach to calculate the nth term of the Fibonacci sequence.
Get hands-on with 1400+ tech skills courses.