Skip to content

Latest commit

 

History

History

memoized-fibonacci

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Memoized Fibonacci

Description

Explanation of the Fibonacci sequence you can read here.

NOTE: it's an improved version of the Fibonacci algorithm that caches an array and works with large number position without performance issues.

Implementation

memoizedFibonacci(index, cache) should return a number on given index from Fibonacci sequence.

Example:

memoizedFibonacci(10) // 55