Who Was Fibonacci?
Leonardo of Pisa, known as Fibonacci, was a 13th-century Italian mathematician who introduced the Hindu-Arabic numeral system to Europe. His name became immortalized through the Fibonacci sequence, where each number is the sum of the two preceding ones (0, 1, 1, 2, 3, 5, ...). Found in nature, art, and algorithms, it is a beautiful example of mathematics in the wild.
Below, you'll find two sections: the original, simple implementations of the sequence, followed by optimized techniques using memoization, iteration, and tail recursion in various languages.