← Back to Algorithms

Fibonacci Sequence

Calculates the nth Fibonacci number using dynamic programming to avoid redundant calculations.

Medium

How it Works

The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones. This algorithm uses dynamic programming to store the results of subproblems to avoid redundant calculations.