Learn
Recursion Basics
Recursion is a programming technique where a function calls itself to solve smaller instances of the same problem. You need two parts: a base case that stops recursion, and a recursive case that breaks the problem down.
For Fibonacci, your base cases are and . The recursive case uses the formula .